Struct vpb::BlockOffset
source · [−]Fields
key: Bytesoffset: u32len: u32Implementations
sourceimpl BlockOffset
impl BlockOffset
Trait Implementations
sourceimpl Clone for BlockOffset
impl Clone for BlockOffset
sourcefn clone(&self) -> BlockOffset
fn clone(&self) -> BlockOffset
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for BlockOffset
impl Debug for BlockOffset
sourceimpl Default for BlockOffset
impl Default for BlockOffset
sourceimpl Hash for BlockOffset
impl Hash for BlockOffset
sourceimpl Message for BlockOffset
impl Message for BlockOffset
sourcefn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
sourcefn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Encodes the message to a buffer. Read more
sourcefn encode_to_vec(&self) -> Vec<u8, Global>
fn encode_to_vec(&self) -> Vec<u8, Global>
Encodes the message to a newly allocated buffer.
sourcefn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Encodes the message with a length-delimiter to a buffer. Read more
sourcefn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>
fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>
Encodes the message with a length-delimiter to a newly allocated buffer.
sourcefn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Decodes an instance of the message from a buffer. Read more
sourcefn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
sourcefn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Decodes an instance of the message from a buffer, and merges it into self. Read more
sourcefn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Decodes a length-delimited instance of the message from buffer, and
merges it into self. Read more
sourceimpl PartialEq<BlockOffset> for BlockOffset
impl PartialEq<BlockOffset> for BlockOffset
sourcefn eq(&self, other: &BlockOffset) -> bool
fn eq(&self, other: &BlockOffset) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
impl Eq for BlockOffset
impl StructuralEq for BlockOffset
impl StructuralPartialEq for BlockOffset
Auto Trait Implementations
impl RefUnwindSafe for BlockOffset
impl Send for BlockOffset
impl Sync for BlockOffset
impl Unpin for BlockOffset
impl UnwindSafe for BlockOffset
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Checksumer for T
impl<T> Checksumer for T
sourcefn checksum(&self, algorithm: ChecksumAlgorithm) -> Checksumwhere
Self: AsRef<[u8]>,
fn checksum(&self, algorithm: ChecksumAlgorithm) -> Checksumwhere
Self: AsRef<[u8]>,
Calculates checksum of data.
sourcefn verify_checksum(&self, expected: u64, algo: ChecksumAlgorithm) -> boolwhere
Self: AsRef<[u8]>,
fn verify_checksum(&self, expected: u64, algo: ChecksumAlgorithm) -> boolwhere
Self: AsRef<[u8]>,
Validates the checksum for the data against the given expected checksum. Return true if the checksum is valid.
sourceimpl<T> Compressor for T
impl<T> Compressor for T
fn compress_to(&self, dst: &mut [u8], cmp: Compression) -> Result<usize, Error>where
Self: AsRef<[u8]>,
fn compress_into_vec(&self, cmp: Compression) -> Result<Vec<u8>, Error>where
Self: AsRef<[u8]>,
fn decompress_to(&self, dst: &mut [u8], cmp: Compression) -> Result<usize, Error>where
Self: AsRef<[u8]>,
fn decompress_into_vec(&self, cmp: Compression) -> Result<Vec<u8>, Error>where
Self: AsRef<[u8]>,
fn max_encoded_len(&self, cmp: Compression) -> usizewhere
Self: AsRef<[u8]>,
sourceimpl<T> Encryptor for T
impl<T> Encryptor for T
sourcefn encrypt(
&mut self,
key: &[u8],
iv: &[u8],
algo: EncryptionAlgorithm
) -> Result<(), EncryptError>where
Self: AsMut<[u8]>,
fn encrypt(
&mut self,
key: &[u8],
iv: &[u8],
algo: EncryptionAlgorithm
) -> Result<(), EncryptError>where
Self: AsMut<[u8]>,
Encrypts self with IV. Can be used for both encryption and decryption. Read more
sourcefn encrypt_to_vec(
&self,
key: &[u8],
iv: &[u8],
algo: EncryptionAlgorithm
) -> Result<Vec<u8>, EncryptError>where
Self: AsRef<[u8]>,
fn encrypt_to_vec(
&self,
key: &[u8],
iv: &[u8],
algo: EncryptionAlgorithm
) -> Result<Vec<u8>, EncryptError>where
Self: AsRef<[u8]>,
Encrypts self with IV to a new Vec.
Can be used for both encryption and decryption. Read more
sourcefn encrypt_to(
&self,
dst: &mut [u8],
key: &[u8],
iv: &[u8],
algo: EncryptionAlgorithm
) -> Result<(), EncryptError>where
Self: AsRef<[u8]>,
fn encrypt_to(
&self,
dst: &mut [u8],
key: &[u8],
iv: &[u8],
algo: EncryptionAlgorithm
) -> Result<(), EncryptError>where
Self: AsRef<[u8]>,
Encrypts self with IV to dst.
Can be used for both encryption and decryption. Read more