pub struct Stream { /* private fields */ }Expand description
A recording decoded as its bytes come.
Implementations§
Source§impl Stream
impl Stream
pub fn new() -> Self
Sourcepub fn push(&mut self, bytes: &[u8]) -> Result<usize, Error>
pub fn push(&mut self, bytes: &[u8]) -> Result<usize, Error>
Decodes what bytes complete: how many records came. A cut record
waits for the next push; bytes that are no recording are an error,
and so is a header of another version.
Sourcepub fn poll(&mut self, t: &mut dyn Transport) -> Result<Polled, PollError>
pub fn poll(&mut self, t: &mut dyn Transport) -> Result<Polled, PollError>
Reads what t has into the stream: Polled::More with the
records that came, Polled::Idle, Polled::Ended, or
Polled::Reset after starting again for a new recording.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Stream
impl Freeze for Stream
impl RefUnwindSafe for Stream
impl Send for Stream
impl Sync for Stream
impl Unpin for Stream
impl UnsafeUnpin for Stream
impl UnwindSafe for Stream
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