pub struct ByteVector(/* private fields */);Expand description
A vector of bytes
Implementations§
Source§impl ByteVector
impl ByteVector
pub fn new(vec: Vec<u8>) -> Self
pub fn new_mutable(vec: Vec<u8>) -> Self
pub fn as_slice(&self) -> MappedRwLockReadGuard<'_, [u8]>
pub fn as_mut_slice(&self) -> MappedRwLockWriteGuard<'_, [u8]>
pub fn as_mut_vec(&self) -> RwLockWriteGuard<'_, Vec<u8>>
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn clear(&self)
pub fn get(&self, idx: usize) -> Option<u8>
Trait Implementations§
Source§impl Clone for ByteVector
impl Clone for ByteVector
Source§fn clone(&self) -> ByteVector
fn clone(&self) -> ByteVector
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 From<ByteVector> for UnpackedValue
impl From<ByteVector> for UnpackedValue
Source§fn from(v: ByteVector) -> Self
fn from(v: ByteVector) -> Self
Converts to this type from the input type.
Source§impl From<ByteVector> for Value
impl From<ByteVector> for Value
Source§fn from(v: ByteVector) -> Self
fn from(v: ByteVector) -> Self
Converts to this type from the input type.
Source§impl Hash for ByteVector
impl Hash for ByteVector
Source§impl PartialEq<[u8]> for ByteVector
impl PartialEq<[u8]> for ByteVector
Source§impl PartialEq for ByteVector
impl PartialEq for ByteVector
Source§impl Trace for ByteVector
impl Trace for ByteVector
Source§impl TryFrom<&Value> for ByteVector
impl TryFrom<&Value> for ByteVector
Source§impl TryFrom<UnpackedValue> for ByteVector
impl TryFrom<UnpackedValue> for ByteVector
Auto Trait Implementations§
impl Freeze for ByteVector
impl !RefUnwindSafe for ByteVector
impl Send for ByteVector
impl Sync for ByteVector
impl Unpin for ByteVector
impl !UnwindSafe for ByteVector
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more