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