Type Alias BlockBlob

Source
pub type BlockBlob = StorableVec<u8>;
Expand description

A serialized block.

Aliased Type§

struct BlockBlob(pub Vec<u8>);

Fields§

§0: Vec<u8>

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 24 bytes

Trait Implementations

Source§

impl<T> Borrow<[T]> for StorableVec<T>

Source§

fn borrow(&self) -> &[T]

Immutably borrows from an owned value. Read more
Source§

impl<T> Clone for StorableVec<T>
where T: Clone,

Source§

fn clone(&self) -> StorableVec<T>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T> Debug for StorableVec<T>
where T: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<T> Deref for StorableVec<T>

Source§

type Target = [T]

The resulting type after dereferencing.
Source§

fn deref(&self) -> &[T]

Dereferences the value.
Source§

impl<T> Hash for StorableVec<T>
where T: Hash,

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<T> Key for StorableVec<T>
where T: Pod + Debug + Ord,

Source§

const KEY_COMPARE: KeyCompare = KeyCompare::Default

Compare 2 Key’s against each other. Read more
Source§

impl<T> Ord for StorableVec<T>
where T: Ord,

Source§

fn cmp(&self, other: &StorableVec<T>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<T> PartialEq for StorableVec<T>
where T: PartialEq,

Source§

fn eq(&self, other: &StorableVec<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> PartialOrd for StorableVec<T>
where T: PartialOrd,

Source§

fn partial_cmp(&self, other: &StorableVec<T>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<T> Storable for StorableVec<T>
where T: Pod + Debug,

Source§

fn as_bytes(&self) -> &[u8]

Casts the inner Vec<T> directly as bytes.

Source§

fn from_bytes(bytes: &[u8]) -> StorableVec<T>

This always allocates a new Vec<T>, casting bytes into a vector of type T.

Source§

const BYTE_LENGTH: Option<usize> = None

Is this type fixed width in byte length? Read more
Source§

impl<T> TransparentWrapper<Vec<T>> for StorableVec<T>

Source§

fn wrap(s: Inner) -> Self
where Self: Sized,

Convert the inner type into the wrapper type.
Source§

fn wrap_ref(s: &Inner) -> &Self

Convert a reference to the inner type into a reference to the wrapper type.
Source§

fn wrap_mut(s: &mut Inner) -> &mut Self

Convert a mutable reference to the inner type into a mutable reference to the wrapper type.
Source§

fn wrap_slice(s: &[Inner]) -> &[Self]
where Self: Sized,

Convert a slice to the inner type into a slice to the wrapper type.
Source§

fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]
where Self: Sized,

Convert a mutable slice to the inner type into a mutable slice to the wrapper type.
Source§

fn peel(s: Self) -> Inner
where Self: Sized,

Convert the wrapper type into the inner type.
Source§

fn peel_ref(s: &Self) -> &Inner

Convert a reference to the wrapper type into a reference to the inner type.
Source§

fn peel_mut(s: &mut Self) -> &mut Inner

Convert a mutable reference to the wrapper type into a mutable reference to the inner type.
Source§

fn peel_slice(s: &[Self]) -> &[Inner]
where Self: Sized,

Convert a slice to the wrapped type into a slice to the inner type.
Source§

fn peel_slice_mut(s: &mut [Self]) -> &mut [Inner]
where Self: Sized,

Convert a mutable slice to the wrapped type into a mutable slice to the inner type.
Source§

impl<T> Eq for StorableVec<T>
where T: Eq,

Source§

impl<T> StructuralPartialEq for StorableVec<T>