pub struct Dstream<'a> { /* private fields */ }Expand description
Byte stream for deserialisation.
This type borrows a slice, keeping track internally of the used bytes.
Implementations§
source§impl<'a> Dstream<'a>
impl<'a> Dstream<'a>
sourcepub fn take<T: Deserialise>(&self) -> Result<T>
pub fn take<T: Deserialise>(&self) -> Result<T>
Deserialises an object from the stream.
§Errors
If the stream doesn’t hold at least the amount of bytes specified by SERIALISED_SIZE, an EndOfStream error is returned.
Auto Trait Implementations§
impl<'a> !Freeze for Dstream<'a>
impl<'a> !RefUnwindSafe for Dstream<'a>
impl<'a> Send for Dstream<'a>
impl<'a> !Sync for Dstream<'a>
impl<'a> Unpin for Dstream<'a>
impl<'a> UnwindSafe for Dstream<'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