pub trait SeekNum:
Sized
+ TryInto<u8>
+ TryFrom<u8>
+ TryInto<i8>
+ TryFrom<i8>
+ TryInto<u16>
+ TryFrom<u16>
+ TryInto<i16>
+ TryFrom<i16>
+ TryInto<u32>
+ TryFrom<u32>
+ TryInto<i32>
+ TryFrom<i32>
+ TryInto<u64>
+ TryFrom<u64>
+ TryInto<i64>
+ TryFrom<i64>
+ TryInto<u128>
+ TryFrom<u128>
+ TryInto<i128>
+ TryFrom<i128>
+ TryInto<usize>
+ TryFrom<usize>
+ TryInto<isize>
+ TryFrom<isize> {
// Required methods
fn from_block_byte<T>(
block: T,
byte: u8,
bs: u8,
) -> Result<Self, OverflowError>
where T: SeekNum;
fn to_block_byte<T>(self, bs: u8) -> Result<(T, u8), OverflowError>
where T: SeekNum;
}
Expand description
Trait implemented for numeric types which can be used with the
SyncStreamCipherSeek
trait.
This trait is implemented for primitive numeric types, i.e. i/u8
,
i/u16
, i/u32
, i/u64
, i/u128
, and i/usize
. It is not intended
to be implemented in third-party crates.
Required Methods§
Sourcefn from_block_byte<T>(block: T, byte: u8, bs: u8) -> Result<Self, OverflowError>where
T: SeekNum,
fn from_block_byte<T>(block: T, byte: u8, bs: u8) -> Result<Self, OverflowError>where
T: SeekNum,
Try to get position for block number block
, byte position inside
block byte
, and block size bs
.
Sourcefn to_block_byte<T>(self, bs: u8) -> Result<(T, u8), OverflowError>where
T: SeekNum,
fn to_block_byte<T>(self, bs: u8) -> Result<(T, u8), OverflowError>where
T: SeekNum,
Try to get block number and bytes position for given block size bs
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.