Trait cipher::stream::SyncStreamCipherSeek [−][src]
pub trait SyncStreamCipherSeek {
fn try_current_pos<T: SeekNum>(&self) -> Result<T, OverflowError>;
fn try_seek<T: SeekNum>(&mut self, pos: T) -> Result<(), LoopError>;
fn current_pos<T: SeekNum>(&self) -> T { ... }
fn seek<T: SeekNum>(&mut self, pos: T) { ... }
}Trait for seekable stream ciphers.
Methods of this trait are generic over the SeekNum trait, which is
implemented for primitive numeric types, i.e.: i/u8, i/u16, i/u32,
i/u64, i/u128, and i/usize.
Required methods
fn try_current_pos<T: SeekNum>(&self) -> Result<T, OverflowError>[src]
Try to get current keystream position
Returns LoopError if position can not be represented by type T
fn try_seek<T: SeekNum>(&mut self, pos: T) -> Result<(), LoopError>[src]
Try to seek to the given position
Returns LoopError if provided position value is bigger than
keystream leangth