[−][src]Trait cipher::SeekNum
Trait implemented for numeric types which can be used with the
StreamCipherSeek
trait.
This trait is implemented for primitive numeric types, i.e. i/u8
,
u16
, u32
, u64
, u128
, usize
, and i32
. It is not intended
to be implemented in third-party crates.
Required methods
pub fn from_block_byte<T: SeekNum>(
block: T,
byte: u8,
bs: u8
) -> Result<Self, OverflowError>
[src]
block: T,
byte: u8,
bs: u8
) -> Result<Self, OverflowError>
Try to get position for block number block
, byte position inside
block byte
, and block size bs
.
pub fn to_block_byte<T: SeekNum>(self, bs: u8) -> Result<(T, u8), OverflowError>
[src]
Try to get block number and bytes position for given block size bs
.
Implementations on Foreign Types
impl SeekNum for u8
[src]
pub fn from_block_byte<T: TryInto<Self>>(
block: T,
byte: u8,
bs: u8
) -> Result<Self, OverflowError>
[src]
block: T,
byte: u8,
bs: u8
) -> Result<Self, OverflowError>
pub fn to_block_byte<T: TryFrom<Self>>(
self,
bs: u8
) -> Result<(T, u8), OverflowError>
[src]
self,
bs: u8
) -> Result<(T, u8), OverflowError>
impl SeekNum for u16
[src]
pub fn from_block_byte<T: TryInto<Self>>(
block: T,
byte: u8,
bs: u8
) -> Result<Self, OverflowError>
[src]
block: T,
byte: u8,
bs: u8
) -> Result<Self, OverflowError>
pub fn to_block_byte<T: TryFrom<Self>>(
self,
bs: u8
) -> Result<(T, u8), OverflowError>
[src]
self,
bs: u8
) -> Result<(T, u8), OverflowError>
impl SeekNum for u32
[src]
pub fn from_block_byte<T: TryInto<Self>>(
block: T,
byte: u8,
bs: u8
) -> Result<Self, OverflowError>
[src]
block: T,
byte: u8,
bs: u8
) -> Result<Self, OverflowError>
pub fn to_block_byte<T: TryFrom<Self>>(
self,
bs: u8
) -> Result<(T, u8), OverflowError>
[src]
self,
bs: u8
) -> Result<(T, u8), OverflowError>
impl SeekNum for u64
[src]
pub fn from_block_byte<T: TryInto<Self>>(
block: T,
byte: u8,
bs: u8
) -> Result<Self, OverflowError>
[src]
block: T,
byte: u8,
bs: u8
) -> Result<Self, OverflowError>
pub fn to_block_byte<T: TryFrom<Self>>(
self,
bs: u8
) -> Result<(T, u8), OverflowError>
[src]
self,
bs: u8
) -> Result<(T, u8), OverflowError>
impl SeekNum for u128
[src]
pub fn from_block_byte<T: TryInto<Self>>(
block: T,
byte: u8,
bs: u8
) -> Result<Self, OverflowError>
[src]
block: T,
byte: u8,
bs: u8
) -> Result<Self, OverflowError>
pub fn to_block_byte<T: TryFrom<Self>>(
self,
bs: u8
) -> Result<(T, u8), OverflowError>
[src]
self,
bs: u8
) -> Result<(T, u8), OverflowError>
impl SeekNum for usize
[src]
pub fn from_block_byte<T: TryInto<Self>>(
block: T,
byte: u8,
bs: u8
) -> Result<Self, OverflowError>
[src]
block: T,
byte: u8,
bs: u8
) -> Result<Self, OverflowError>
pub fn to_block_byte<T: TryFrom<Self>>(
self,
bs: u8
) -> Result<(T, u8), OverflowError>
[src]
self,
bs: u8
) -> Result<(T, u8), OverflowError>
impl SeekNum for i32
[src]
pub fn from_block_byte<T: TryInto<Self>>(
block: T,
byte: u8,
bs: u8
) -> Result<Self, OverflowError>
[src]
block: T,
byte: u8,
bs: u8
) -> Result<Self, OverflowError>
pub fn to_block_byte<T: TryFrom<Self>>(
self,
bs: u8
) -> Result<(T, u8), OverflowError>
[src]
self,
bs: u8
) -> Result<(T, u8), OverflowError>