[−][src]Trait aesni::stream::SeekNum
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
fn from_block_byte<T>(block: T, byte: u8, bs: u8) -> Result<Self, OverflowError> where
T: SeekNum,
T: SeekNum,
Try to get position for block number block
, byte position inside
block byte
, and block size bs
.
fn to_block_byte<T>(self, bs: u8) -> Result<(T, u8), OverflowError> where
T: SeekNum,
T: SeekNum,
Try to get block number and bytes position for given block size bs
.
Implementors
impl SeekNum for i8
[src]
fn from_block_byte<T>(block: T, byte: u8, bs: u8) -> Result<i8, OverflowError> where
T: TryInto<i8>,
[src]
T: TryInto<i8>,
fn to_block_byte<T>(self, bs: u8) -> Result<(T, u8), OverflowError> where
T: TryFrom<i8>,
[src]
T: TryFrom<i8>,
impl SeekNum for i16
[src]
fn from_block_byte<T>(block: T, byte: u8, bs: u8) -> Result<i16, OverflowError> where
T: TryInto<i16>,
[src]
T: TryInto<i16>,
fn to_block_byte<T>(self, bs: u8) -> Result<(T, u8), OverflowError> where
T: TryFrom<i16>,
[src]
T: TryFrom<i16>,
impl SeekNum for i32
[src]
fn from_block_byte<T>(block: T, byte: u8, bs: u8) -> Result<i32, OverflowError> where
T: TryInto<i32>,
[src]
T: TryInto<i32>,
fn to_block_byte<T>(self, bs: u8) -> Result<(T, u8), OverflowError> where
T: TryFrom<i32>,
[src]
T: TryFrom<i32>,
impl SeekNum for i64
[src]
fn from_block_byte<T>(block: T, byte: u8, bs: u8) -> Result<i64, OverflowError> where
T: TryInto<i64>,
[src]
T: TryInto<i64>,
fn to_block_byte<T>(self, bs: u8) -> Result<(T, u8), OverflowError> where
T: TryFrom<i64>,
[src]
T: TryFrom<i64>,
impl SeekNum for i128
[src]
fn from_block_byte<T>(block: T, byte: u8, bs: u8) -> Result<i128, OverflowError> where
T: TryInto<i128>,
[src]
T: TryInto<i128>,
fn to_block_byte<T>(self, bs: u8) -> Result<(T, u8), OverflowError> where
T: TryFrom<i128>,
[src]
T: TryFrom<i128>,
impl SeekNum for isize
[src]
fn from_block_byte<T>(
block: T,
byte: u8,
bs: u8
) -> Result<isize, OverflowError> where
T: TryInto<isize>,
[src]
block: T,
byte: u8,
bs: u8
) -> Result<isize, OverflowError> where
T: TryInto<isize>,
fn to_block_byte<T>(self, bs: u8) -> Result<(T, u8), OverflowError> where
T: TryFrom<isize>,
[src]
T: TryFrom<isize>,
impl SeekNum for u8
[src]
fn from_block_byte<T>(block: T, byte: u8, bs: u8) -> Result<u8, OverflowError> where
T: TryInto<u8>,
[src]
T: TryInto<u8>,
fn to_block_byte<T>(self, bs: u8) -> Result<(T, u8), OverflowError> where
T: TryFrom<u8>,
[src]
T: TryFrom<u8>,
impl SeekNum for u16
[src]
fn from_block_byte<T>(block: T, byte: u8, bs: u8) -> Result<u16, OverflowError> where
T: TryInto<u16>,
[src]
T: TryInto<u16>,
fn to_block_byte<T>(self, bs: u8) -> Result<(T, u8), OverflowError> where
T: TryFrom<u16>,
[src]
T: TryFrom<u16>,
impl SeekNum for u32
[src]
fn from_block_byte<T>(block: T, byte: u8, bs: u8) -> Result<u32, OverflowError> where
T: TryInto<u32>,
[src]
T: TryInto<u32>,
fn to_block_byte<T>(self, bs: u8) -> Result<(T, u8), OverflowError> where
T: TryFrom<u32>,
[src]
T: TryFrom<u32>,
impl SeekNum for u64
[src]
fn from_block_byte<T>(block: T, byte: u8, bs: u8) -> Result<u64, OverflowError> where
T: TryInto<u64>,
[src]
T: TryInto<u64>,
fn to_block_byte<T>(self, bs: u8) -> Result<(T, u8), OverflowError> where
T: TryFrom<u64>,
[src]
T: TryFrom<u64>,
impl SeekNum for u128
[src]
fn from_block_byte<T>(block: T, byte: u8, bs: u8) -> Result<u128, OverflowError> where
T: TryInto<u128>,
[src]
T: TryInto<u128>,
fn to_block_byte<T>(self, bs: u8) -> Result<(T, u8), OverflowError> where
T: TryFrom<u128>,
[src]
T: TryFrom<u128>,
impl SeekNum for usize
[src]
fn from_block_byte<T>(
block: T,
byte: u8,
bs: u8
) -> Result<usize, OverflowError> where
T: TryInto<usize>,
[src]
block: T,
byte: u8,
bs: u8
) -> Result<usize, OverflowError> where
T: TryInto<usize>,
fn to_block_byte<T>(self, bs: u8) -> Result<(T, u8), OverflowError> where
T: TryFrom<usize>,
[src]
T: TryFrom<usize>,