pub struct MinimalBinaryCodec;
Expand description
MinimalBinaryCodec: uses an upper bound as a runtime parameter.
For more information refer to the MinimalBinaryCodec
module.
Implementations§
Source§impl MinimalBinaryCodec
impl MinimalBinaryCodec
Sourcepub fn encode<E: Endianness, W: MinimalBinaryWrite<E>>(
writer: &mut W,
value: u64,
upper_bound: u64,
) -> Result<usize, Box<dyn Error>>
pub fn encode<E: Endianness, W: MinimalBinaryWrite<E>>( writer: &mut W, value: u64, upper_bound: u64, ) -> Result<usize, Box<dyn Error>>
Encodes a value using the minimal binary codec with the specified upper bound.
Sourcepub fn decode<E: Endianness, R>(
reader: &mut R,
upper_bound: u64,
) -> Result<u64, Box<dyn Error>>where
R: MinimalBinaryRead<E>,
pub fn decode<E: Endianness, R>(
reader: &mut R,
upper_bound: u64,
) -> Result<u64, Box<dyn Error>>where
R: MinimalBinaryRead<E>,
Decodes a value using the minimal binary codec with the specified upper bound.
Trait Implementations§
Source§impl<E: Endianness, W: MinimalBinaryWrite<E>> Codec<E, W> for MinimalBinaryCodec
impl<E: Endianness, W: MinimalBinaryWrite<E>> Codec<E, W> for MinimalBinaryCodec
Auto Trait Implementations§
impl Freeze for MinimalBinaryCodec
impl RefUnwindSafe for MinimalBinaryCodec
impl Send for MinimalBinaryCodec
impl Sync for MinimalBinaryCodec
impl Unpin for MinimalBinaryCodec
impl UnwindSafe for MinimalBinaryCodec
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, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
Source§impl<T> DowncastableFrom<T> for T
impl<T> DowncastableFrom<T> for T
Source§fn downcast_from(value: T) -> T
fn downcast_from(value: T) -> T
Truncate the current UnsignedInt to a possibly smaller size
Source§impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
Source§impl<T> UpcastableFrom<T> for T
impl<T> UpcastableFrom<T> for T
Source§fn upcast_from(value: T) -> T
fn upcast_from(value: T) -> T
Extend the current UnsignedInt to a possibly bigger size.