pub struct PackedUint(pub u64);Tuple Fields§
§0: u64Trait Implementations§
Source§impl DataFormat for PackedUint
impl DataFormat for PackedUint
const LATEST_HEADER: Self::Header = ()
type Header = ()
Source§fn write_data<W: Write>(&self, writer: &mut W) -> Result<usize, DataWriteError>
fn write_data<W: Write>(&self, writer: &mut W) -> Result<usize, DataWriteError>
Write the data to the writer
Source§fn read_data<R: Read>(
reader: &mut R,
_header: &Self::Header,
) -> Result<Self, DataReadError>
fn read_data<R: Read>( reader: &mut R, _header: &Self::Header, ) -> Result<Self, DataReadError>
Read the data from the reader
fn write_header<W: Write>( &self, writer: &mut W, ) -> Result<usize, DataWriteError>
fn read_header<R: Read>(reader: &mut R) -> Result<Self::Header, DataReadError>
Source§fn to_byte_vec(&self) -> Result<Vec<u8>, DataWriteError>
fn to_byte_vec(&self) -> Result<Vec<u8>, DataWriteError>
Convert the data to a byte vector
Source§impl From<PackedUint> for usize
impl From<PackedUint> for usize
Source§fn from(value: PackedUint) -> Self
fn from(value: PackedUint) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PackedUint
impl RefUnwindSafe for PackedUint
impl Send for PackedUint
impl Sync for PackedUint
impl Unpin for PackedUint
impl UnwindSafe for PackedUint
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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