pub struct U32BE(/* private fields */);
Expand description
A u32
wrapper that implements crate::Encodable
and crate::Decodable
by encoding as a big-endian fixed-width integer.
Trait Implementations§
Source§impl Decodable for U32BE
impl Decodable for U32BE
Source§async fn decode<Producer>(
producer: &mut Producer,
) -> Result<Self, DecodeError<Producer::Error>>
async fn decode<Producer>( producer: &mut Producer, ) -> Result<Self, DecodeError<Producer::Error>>
Decade a value to a bytestring in a specific way that is best described over at willowprotocol.org. Read more
Source§impl Decodable for U32BE
impl Decodable for U32BE
Source§fn decode<Producer>(
producer: &mut Producer,
) -> Result<Self, DecodeError<Producer::Error>>
fn decode<Producer>( producer: &mut Producer, ) -> Result<Self, DecodeError<Producer::Error>>
Decode a value to a bytestring in a specific way that is best described over at willowprotocol.org. Read more
Source§impl Encodable for U32BE
impl Encodable for U32BE
Source§async fn encode<Consumer>(
&self,
consumer: &mut Consumer,
) -> Result<(), Consumer::Error>where
Consumer: BulkConsumer<Item = u8>,
async fn encode<Consumer>(
&self,
consumer: &mut Consumer,
) -> Result<(), Consumer::Error>where
Consumer: BulkConsumer<Item = u8>,
Encode a value to a bytestring in a specific way that is best described over at willowprotocol.org. Read more
Source§impl Encodable for U32BE
impl Encodable for U32BE
Source§fn encode<Consumer>(
&self,
consumer: &mut Consumer,
) -> Result<(), Consumer::Error>where
Consumer: BulkConsumer<Item = u8>,
fn encode<Consumer>(
&self,
consumer: &mut Consumer,
) -> Result<(), Consumer::Error>where
Consumer: BulkConsumer<Item = u8>,
Encode a value to a bytestring in a specific way that is best described over at willowprotocol.org. Read more
Source§impl Ord for U32BE
impl Ord for U32BE
Source§impl PartialOrd for U32BE
impl PartialOrd for U32BE
impl Eq for U32BE
impl StructuralPartialEq for U32BE
Auto Trait Implementations§
impl Freeze for U32BE
impl RefUnwindSafe for U32BE
impl Send for U32BE
impl Sync for U32BE
impl Unpin for U32BE
impl UnwindSafe for U32BE
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more