pub struct Pack { /* private fields */ }Expand description
A parsed pack: its bytes and where each entry lies in them.
Implementations§
Source§impl Pack
impl Pack
Sourcepub fn parse(data: Vec<u8>) -> Option<Self>
pub fn parse(data: Vec<u8>) -> Option<Self>
Parses data as a pack.
Returns None for anything malformed: a wrong first line, a
truncated record, an entry over MAX_ENTRY_BYTES, keys out of
order or repeated, trailing bytes, or a pack over
MAX_PACK_BYTES.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Pack
impl Freeze for Pack
impl Move for Pack
impl RefUnwindSafe for Pack
impl Send for Pack
impl Sync for Pack
impl Unpin for Pack
impl UnsafeUnpin for Packwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<([u8; 32], (usize, usize))>: UnsafeUnpin,
impl UnwindSafe for Pack
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