pub struct Int<const BITS: usize, E, S, ST = UncheckedState>{ /* private fields */ }Implementations§
Source§impl<const BITS: usize, E, S, ST> Int<BITS, E, S, ST>where
E: ByteOrder,
S: Storage,
ST: State,
SizeSelector<BITS>: SmallestUInt + SmallestInt<U = <SizeSelector<BITS> as SmallestUInt>::T>,
<SizeSelector<BITS> as SmallestUInt>::T: DecodeFromStorage<E>,
impl<const BITS: usize, E, S, ST> Int<BITS, E, S, ST>where
E: ByteOrder,
S: Storage,
ST: State,
SizeSelector<BITS>: SmallestUInt + SmallestInt<U = <SizeSelector<BITS> as SmallestUInt>::T>,
<SizeSelector<BITS> as SmallestUInt>::T: DecodeFromStorage<E>,
pub fn try_read(&self) -> Result<<SizeSelector<BITS> as SmallestInt>::T, Error>
Source§impl<const BITS: usize, E, S, ST> Int<BITS, E, S, ST>where
E: ByteOrder,
S: MutStorage,
ST: State,
SizeSelector<BITS>: SmallestUInt + SmallestInt<U = <SizeSelector<BITS> as SmallestUInt>::T>,
<SizeSelector<BITS> as SmallestUInt>::T: EncodeToStorage<E>,
impl<const BITS: usize, E, S, ST> Int<BITS, E, S, ST>where
E: ByteOrder,
S: MutStorage,
ST: State,
SizeSelector<BITS>: SmallestUInt + SmallestInt<U = <SizeSelector<BITS> as SmallestUInt>::T>,
<SizeSelector<BITS> as SmallestUInt>::T: EncodeToStorage<E>,
pub fn try_write( &mut self, val: <SizeSelector<BITS> as SmallestInt>::T, ) -> Result<(), Error>
Trait Implementations§
Source§impl<const BITS: usize, E, S, ST> InfallibleRead for Int<BITS, E, S, ST>where
E: ByteOrder,
S: Storage,
ST: IsOk,
SizeSelector<BITS>: SmallestUInt + SmallestInt<U = <SizeSelector<BITS> as SmallestUInt>::T>,
<SizeSelector<BITS> as SmallestUInt>::T: DecodeFromStorage<E>,
impl<const BITS: usize, E, S, ST> InfallibleRead for Int<BITS, E, S, ST>where
E: ByteOrder,
S: Storage,
ST: IsOk,
SizeSelector<BITS>: SmallestUInt + SmallestInt<U = <SizeSelector<BITS> as SmallestUInt>::T>,
<SizeSelector<BITS> as SmallestUInt>::T: DecodeFromStorage<E>,
type ReadValue = <SizeSelector<BITS> as SmallestInt>::T
fn read(&self) -> <SizeSelector<BITS> as SmallestInt>::T
Source§impl<const BITS: usize, E, S, ST> InfallibleWrite for Int<BITS, E, S, ST>where
E: ByteOrder,
S: MutStorage,
ST: IsComplete,
SizeSelector<BITS>: SmallestUInt + SmallestInt<U = <SizeSelector<BITS> as SmallestUInt>::T>,
<SizeSelector<BITS> as SmallestUInt>::T: EncodeToStorage<E>,
impl<const BITS: usize, E, S, ST> InfallibleWrite for Int<BITS, E, S, ST>where
E: ByteOrder,
S: MutStorage,
ST: IsComplete,
SizeSelector<BITS>: SmallestUInt + SmallestInt<U = <SizeSelector<BITS> as SmallestUInt>::T>,
<SizeSelector<BITS> as SmallestUInt>::T: EncodeToStorage<E>,
type WriteValue = <SizeSelector<BITS> as SmallestInt>::T
type Output = Int<BITS, E, S, <ST as State>::OnLayoutMutation>
fn write( self, val: <SizeSelector<BITS> as SmallestInt>::T, ) -> <Int<BITS, E, S, ST> as InfallibleWrite>::Output
Source§impl<const BITS: usize, E, S, ST> TryRead for Int<BITS, E, S, ST>where
E: ByteOrder,
S: Storage,
ST: State,
SizeSelector<BITS>: SmallestUInt + SmallestInt<U = <SizeSelector<BITS> as SmallestUInt>::T>,
<SizeSelector<BITS> as SmallestUInt>::T: DecodeFromStorage<E>,
impl<const BITS: usize, E, S, ST> TryRead for Int<BITS, E, S, ST>where
E: ByteOrder,
S: Storage,
ST: State,
SizeSelector<BITS>: SmallestUInt + SmallestInt<U = <SizeSelector<BITS> as SmallestUInt>::T>,
<SizeSelector<BITS> as SmallestUInt>::T: DecodeFromStorage<E>,
Source§impl<const BITS: usize, E, S, ST> TryWrite for Int<BITS, E, S, ST>where
E: ByteOrder,
S: MutStorage,
ST: State,
SizeSelector<BITS>: SmallestUInt + SmallestInt<U = <SizeSelector<BITS> as SmallestUInt>::T>,
<SizeSelector<BITS> as SmallestUInt>::T: EncodeToStorage<E>,
impl<const BITS: usize, E, S, ST> TryWrite for Int<BITS, E, S, ST>where
E: ByteOrder,
S: MutStorage,
ST: State,
SizeSelector<BITS>: SmallestUInt + SmallestInt<U = <SizeSelector<BITS> as SmallestUInt>::T>,
<SizeSelector<BITS> as SmallestUInt>::T: EncodeToStorage<E>,
type WriteValue = <SizeSelector<BITS> as SmallestInt>::T
fn try_write( &mut self, val: <Int<BITS, E, S, ST> as TryWrite>::WriteValue, ) -> Result<(), Error>
Auto Trait Implementations§
impl<const BITS: usize, E, S, ST> Freeze for Int<BITS, E, S, ST>where
S: Freeze,
impl<const BITS: usize, E, S, ST> RefUnwindSafe for Int<BITS, E, S, ST>
impl<const BITS: usize, E, S, ST> Send for Int<BITS, E, S, ST>
impl<const BITS: usize, E, S, ST> Sync for Int<BITS, E, S, ST>
impl<const BITS: usize, E, S, ST> Unpin for Int<BITS, E, S, ST>
impl<const BITS: usize, E, S, ST> UnsafeUnpin for Int<BITS, E, S, ST>where
S: UnsafeUnpin,
impl<const BITS: usize, E, S, ST> UnwindSafe for Int<BITS, E, S, ST>
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