pub struct Preamble { /* private fields */ }Implementations§
Source§impl Preamble
impl Preamble
pub fn new(header_len: usize) -> Result<Self, FormatError>
Sourcepub fn with_signed(header_len: usize, signed: bool) -> Result<Self, FormatError>
pub fn with_signed(header_len: usize, signed: bool) -> Result<Self, FormatError>
Signed containers advertise minor 2, so a v0.1 reader refuses them rather than opening them with the signature silently ignored.
pub fn header_len(self) -> usize
pub fn is_signed(self) -> bool
pub fn encode(self) -> [u8; 16]
pub fn decode(bytes: &[u8]) -> Result<Self, FormatError>
Trait Implementations§
impl Copy for Preamble
impl Eq for Preamble
impl StructuralPartialEq for Preamble
Auto Trait Implementations§
impl Freeze for Preamble
impl RefUnwindSafe for Preamble
impl Send for Preamble
impl Sync for Preamble
impl Unpin for Preamble
impl UnsafeUnpin for Preamble
impl UnwindSafe for Preamble
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