pub struct DocReader<T>where
T: StrictDecode,{ /* private fields */ }Implementations§
Trait Implementations§
Source§impl<T> StrictDecode for DocReader<T>where
T: StrictDecode,
impl<T> StrictDecode for DocReader<T>where
T: StrictDecode,
Source§fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
Decode with the given
std::io::Read instance; must either
construct an instance or return implementation-specific error type.Source§fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
Tries to deserialize byte array into the current type using
StrictDecode::strict_decode. If there are some data remains in the
buffer once deserialization is completed, fails with
Error::DataNotEntirelyConsumed. Use io::Cursor over the buffer and
StrictDecode::strict_decode to avoid such failures.Source§fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
Reads data from file at
path and reconstructs object from it. Fails
with Error::DataNotEntirelyConsumed if file contains remaining
data after the object reconstruction.Auto Trait Implementations§
impl<T> Freeze for DocReader<T>where
T: Freeze,
impl<T> RefUnwindSafe for DocReader<T>where
T: RefUnwindSafe,
impl<T> Send for DocReader<T>where
T: Send,
impl<T> Sync for DocReader<T>where
T: Sync,
impl<T> Unpin for DocReader<T>where
T: Unpin,
impl<T> UnwindSafe for DocReader<T>where
T: UnwindSafe,
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