pub struct BlockedStream<'a> { /* private fields */ }Expand description
A format 4/5 stream: blocks of BLOCK bytes whose first split bytes (in
stream order) are stored after the remaining BLOCK - split bytes.
Implementations§
Source§impl<'a> BlockedStream<'a>
impl<'a> BlockedStream<'a>
pub fn new(data: &'a [u8], split: usize) -> Result<Self>
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Stream bytes available (a short final block is padded with stale data).
pub fn is_empty(&self) -> bool
Sourcepub fn packets_available(&self) -> usize
pub fn packets_available(&self) -> usize
Number of whole stream bytes needed to hold packets packets.
Trait Implementations§
Source§impl<'a> Clone for BlockedStream<'a>
impl<'a> Clone for BlockedStream<'a>
impl<'a> Copy for BlockedStream<'a>
Auto Trait Implementations§
impl<'a> Freeze for BlockedStream<'a>
impl<'a> RefUnwindSafe for BlockedStream<'a>
impl<'a> Send for BlockedStream<'a>
impl<'a> Sync for BlockedStream<'a>
impl<'a> Unpin for BlockedStream<'a>
impl<'a> UnsafeUnpin for BlockedStream<'a>
impl<'a> UnwindSafe for BlockedStream<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more