pub struct U8BE(/* private fields */);
Expand description
A u8
wrapper that implements crate::Encodable
and crate::Decodable
by encoding as a big-endian fixed-width integer.
Trait Implementations§
Source§impl Decodable for U8BE
impl Decodable for U8BE
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 U8BE
impl Decodable for U8BE
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 U8BE
impl Encodable for U8BE
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 U8BE
impl Encodable for U8BE
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 U8BE
impl Ord for U8BE
Source§impl PartialOrd for U8BE
impl PartialOrd for U8BE
impl Eq for U8BE
impl StructuralPartialEq for U8BE
Auto Trait Implementations§
impl Freeze for U8BE
impl RefUnwindSafe for U8BE
impl Send for U8BE
impl Sync for U8BE
impl Unpin for U8BE
impl UnwindSafe for U8BE
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