pub enum MiningDeviceMessages<'a> {
Common(CommonMessages<'a>),
Mining(Mining<'a>),
Extensions(Extensions<'a>),
}Expand description
A parser of messages that a Mining Device could send
Variants§
Trait Implementations§
Source§impl<'a> Clone for MiningDeviceMessages<'a>
impl<'a> Clone for MiningDeviceMessages<'a>
Source§fn clone(&self) -> MiningDeviceMessages<'a>
fn clone(&self) -> MiningDeviceMessages<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for MiningDeviceMessages<'a>
impl<'a> Debug for MiningDeviceMessages<'a>
Source§impl<'decoder> Decodable<'decoder> for MiningDeviceMessages<'decoder>
impl<'decoder> Decodable<'decoder> for MiningDeviceMessages<'decoder>
Source§fn get_structure(_v: &[u8]) -> Result<Vec<FieldMarker>, Error>
fn get_structure(_v: &[u8]) -> Result<Vec<FieldMarker>, Error>
Defines the expected structure of a type based on binary data. Read more
Source§fn from_decoded_fields(_v: Vec<DecodableField<'decoder>>) -> Result<Self, Error>
fn from_decoded_fields(_v: Vec<DecodableField<'decoder>>) -> Result<Self, Error>
Constructs the type from a vector of decoded fields. Read more
Source§impl<'decoder> From<MiningDeviceMessages<'decoder>> for EncodableField<'decoder>
impl<'decoder> From<MiningDeviceMessages<'decoder>> for EncodableField<'decoder>
Source§fn from(m: MiningDeviceMessages<'decoder>) -> Self
fn from(m: MiningDeviceMessages<'decoder>) -> Self
Converts to this type from the input type.
Source§impl<'a, T: Into<CommonMessages<'a>>> From<T> for MiningDeviceMessages<'a>
impl<'a, T: Into<CommonMessages<'a>>> From<T> for MiningDeviceMessages<'a>
Source§impl GetSize for MiningDeviceMessages<'_>
impl GetSize for MiningDeviceMessages<'_>
Source§impl IsSv2Message for MiningDeviceMessages<'_>
impl IsSv2Message for MiningDeviceMessages<'_>
Source§fn message_type(&self) -> u8
fn message_type(&self) -> u8
get message type
Source§fn channel_bit(&self) -> bool
fn channel_bit(&self) -> bool
get channel bit
Source§fn extension_type(&self) -> u16
fn extension_type(&self) -> u16
get extension type (0 for non-extension messages)
Source§impl<'a> TryFrom<AnyMessage<'a>> for MiningDeviceMessages<'a>
impl<'a> TryFrom<AnyMessage<'a>> for MiningDeviceMessages<'a>
Source§type Error = ParserError
type Error = ParserError
The type returned in the event of a conversion error.
Source§fn try_from(value: AnyMessage<'a>) -> Result<Self, ParserError>
fn try_from(value: AnyMessage<'a>) -> Result<Self, ParserError>
Performs the conversion.
Source§impl<'a> TryFrom<MiningDeviceMessages<'a>> for AnyMessage<'a>
impl<'a> TryFrom<MiningDeviceMessages<'a>> for AnyMessage<'a>
Source§type Error = ParserError
type Error = ParserError
The type returned in the event of a conversion error.
Source§impl<'decoder, B: AsMut<[u8]> + AsRef<[u8]>> TryFrom<MiningDeviceMessages<'decoder>> for Sv2Frame<MiningDeviceMessages<'decoder>, B>
impl<'decoder, B: AsMut<[u8]> + AsRef<[u8]>> TryFrom<MiningDeviceMessages<'decoder>> for Sv2Frame<MiningDeviceMessages<'decoder>, B>
Source§type Error = ParserError
type Error = ParserError
The type returned in the event of a conversion error.
Source§fn try_from(v: MiningDeviceMessages<'decoder>) -> Result<Self, ParserError>
fn try_from(v: MiningDeviceMessages<'decoder>) -> Result<Self, ParserError>
Performs the conversion.
Auto Trait Implementations§
impl<'a> Freeze for MiningDeviceMessages<'a>
impl<'a> RefUnwindSafe for MiningDeviceMessages<'a>
impl<'a> Send for MiningDeviceMessages<'a>
impl<'a> Sync for MiningDeviceMessages<'a>
impl<'a> Unpin for MiningDeviceMessages<'a>
impl<'a> !UnwindSafe for MiningDeviceMessages<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more