Struct versatiles::shared::Blob
source · pub struct Blob(_);
Expand description
A simple wrapper around bytesMut::Bytes
that provides additional methods for working with byte data.
Implementations§
source§impl Blob
impl Blob
sourcepub fn get_range(&self, range: Range<usize>) -> &[u8] ⓘ
pub fn get_range(&self, range: Range<usize>) -> &[u8] ⓘ
Returns a new Blob
containing the bytes in the specified range.
sourcepub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
pub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
Returns a mutable reference to the underlying byte slice.
sourcepub fn as_vec(&self) -> Vec<u8>
pub fn as_vec(&self) -> Vec<u8>
Returns a new Vec<u8>
containing a copy of the underlying bytes.
Trait Implementations§
source§impl PartialEq<Blob> for Blob
impl PartialEq<Blob> for Blob
impl Eq for Blob
impl Send for Blob
impl StructuralEq for Blob
impl StructuralPartialEq for Blob
impl Sync for Blob
Auto Trait Implementations§
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.