pub struct EditPrefix { /* private fields */ }Implementations§
Source§impl EditPrefix
impl EditPrefix
Sourcepub fn new(data: &[u8]) -> Self
pub fn new(data: &[u8]) -> Self
Creates a new EditPrefix for data, computing the checksum and length for framing it.
The length of data may not be larger than u32::MAX.
§Panics
Panics if data.len() > u32::MAX.
Sourcepub fn decode_from_slice(buf: &[u8]) -> Self
pub fn decode_from_slice(buf: &[u8]) -> Self
A helper function for decode, that converts the slice into a fixed length slice.
The length of buf must be equal to EDIT_PREFIX_SIZE.
§Panics
Panics if buf.len() != EDIT_PREFIX_SIZE.
pub fn decode(buf: &[u8; 12]) -> Self
Trait Implementations§
Source§impl Clone for EditPrefix
impl Clone for EditPrefix
Source§fn clone(&self) -> EditPrefix
fn clone(&self) -> EditPrefix
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EditPrefix
impl Debug for EditPrefix
impl Copy for EditPrefix
Auto Trait Implementations§
impl Freeze for EditPrefix
impl RefUnwindSafe for EditPrefix
impl Send for EditPrefix
impl Sync for EditPrefix
impl Unpin for EditPrefix
impl UnsafeUnpin for EditPrefix
impl UnwindSafe for EditPrefix
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