Enum primitives::validator::MessageTypes
source · pub enum MessageTypes {
ApproveState(ApproveState),
NewState(NewState<UncheckedState>),
RejectState(RejectState<UncheckedState>),
Heartbeat(Heartbeat),
}
Expand description
The message types used by validator.
Variants
ApproveState(ApproveState)
NewState(NewState<UncheckedState>)
RejectState(RejectState<UncheckedState>)
Heartbeat(Heartbeat)
Implementations
sourceimpl MessageTypes
impl MessageTypes
pub fn message_type(&self) -> MessageType
Trait Implementations
sourceimpl Clone for MessageTypes
impl Clone for MessageTypes
sourcefn clone(&self) -> MessageTypes
fn clone(&self) -> MessageTypes
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for MessageTypes
impl Debug for MessageTypes
sourceimpl<'de> Deserialize<'de> for MessageTypes
impl<'de> Deserialize<'de> for MessageTypes
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<&MessageTypes> for MessageType
impl From<&MessageTypes> for MessageType
This ensures that all MessageTypes
are also listed in the enum MessageType
!
sourcefn from(message_types: &MessageTypes) -> Self
fn from(message_types: &MessageTypes) -> Self
Converts to this type from the input type.
sourceimpl From<ApproveState> for MessageTypes
impl From<ApproveState> for MessageTypes
sourcefn from(approve_state: ApproveState) -> Self
fn from(approve_state: ApproveState) -> Self
Converts to this type from the input type.
sourceimpl From<Heartbeat> for MessageTypes
impl From<Heartbeat> for MessageTypes
sourceimpl<T: Type> From<Message<T>> for MessageTypes
impl<T: Type> From<Message<T>> for MessageTypes
sourceimpl From<MessageTypes> for MessageType
impl From<MessageTypes> for MessageType
sourcefn from(message_types: MessageTypes) -> Self
fn from(message_types: MessageTypes) -> Self
Converts to this type from the input type.
sourceimpl<S: BalancesState> From<NewState<S>> for MessageTypes
impl<S: BalancesState> From<NewState<S>> for MessageTypes
sourceimpl<S: BalancesState> From<RejectState<S>> for MessageTypes
impl<S: BalancesState> From<RejectState<S>> for MessageTypes
sourcefn from(reject_state: RejectState<S>) -> Self
fn from(reject_state: RejectState<S>) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<MessageTypes> for MessageTypes
impl PartialEq<MessageTypes> for MessageTypes
sourcefn eq(&self, other: &MessageTypes) -> bool
fn eq(&self, other: &MessageTypes) -> bool
sourceimpl Serialize for MessageTypes
impl Serialize for MessageTypes
sourceimpl ToSql for MessageTypes
impl ToSql for MessageTypes
sourcefn to_sql(
&self,
ty: &PgType,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql(
&self,
ty: &PgType,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
Converts the value of
self
into the binary format of the specified
Postgres Type
, appending it to out
. Read moresourcefn accepts(ty: &Type) -> bool
fn accepts(ty: &Type) -> bool
Determines if a value of this type can be converted to the specified
Postgres
Type
. Read moresourcefn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
An adaptor method used internally by Rust-Postgres. Read more
sourcefn encode_format(&self, _ty: &Type) -> Format
fn encode_format(&self, _ty: &Type) -> Format
Specify the encode format
sourceimpl TryFrom<MessageTypes> for ApproveState
impl TryFrom<MessageTypes> for ApproveState
type Error = MessageError<ApproveState>
type Error = MessageError<ApproveState>
The type returned in the event of a conversion error.
sourcefn try_from(value: MessageTypes) -> Result<Self, Self::Error>
fn try_from(value: MessageTypes) -> Result<Self, Self::Error>
Performs the conversion.
sourceimpl TryFrom<MessageTypes> for Heartbeat
impl TryFrom<MessageTypes> for Heartbeat
type Error = MessageError<Heartbeat>
type Error = MessageError<Heartbeat>
The type returned in the event of a conversion error.
sourcefn try_from(value: MessageTypes) -> Result<Self, Self::Error>
fn try_from(value: MessageTypes) -> Result<Self, Self::Error>
Performs the conversion.
sourceimpl<T: Type> TryFrom<MessageTypes> for Message<T>
impl<T: Type> TryFrom<MessageTypes> for Message<T>
type Error = MessageError<T>
type Error = MessageError<T>
The type returned in the event of a conversion error.
sourcefn try_from(value: MessageTypes) -> Result<Self, Self::Error>
fn try_from(value: MessageTypes) -> Result<Self, Self::Error>
Performs the conversion.
sourceimpl<S: BalancesState> TryFrom<MessageTypes> for NewState<S>
impl<S: BalancesState> TryFrom<MessageTypes> for NewState<S>
type Error = MessageError<NewState<S>>
type Error = MessageError<NewState<S>>
The type returned in the event of a conversion error.
sourcefn try_from(value: MessageTypes) -> Result<Self, Self::Error>
fn try_from(value: MessageTypes) -> Result<Self, Self::Error>
Performs the conversion.
sourceimpl<S: BalancesState> TryFrom<MessageTypes> for RejectState<S>
impl<S: BalancesState> TryFrom<MessageTypes> for RejectState<S>
type Error = MessageError<RejectState<S>>
type Error = MessageError<RejectState<S>>
The type returned in the event of a conversion error.
sourcefn try_from(value: MessageTypes) -> Result<Self, Self::Error>
fn try_from(value: MessageTypes) -> Result<Self, Self::Error>
Performs the conversion.
impl Eq for MessageTypes
impl StructuralEq for MessageTypes
impl StructuralPartialEq for MessageTypes
Auto Trait Implementations
impl RefUnwindSafe for MessageTypes
impl Send for MessageTypes
impl Sync for MessageTypes
impl Unpin for MessageTypes
impl UnwindSafe for MessageTypes
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> BorrowToSql for Twhere
T: ToSql,
impl<T> BorrowToSql for Twhere
T: ToSql,
sourcefn borrow_to_sql(&self) -> &dyn ToSql
fn borrow_to_sql(&self) -> &dyn ToSql
Returns a reference to
self
as a ToSql
trait object.