Skip to main content

FieldBlock

Struct FieldBlock 

Source
pub struct FieldBlock<S> { /* private fields */ }

Implementations§

Source§

impl<S> FieldBlock<S>

Source

pub const fn from_storage(storage: S) -> Self

Source

pub fn into_storage(self) -> S

Source

pub fn storage(&self) -> &S

Source§

impl<S: FieldStorage> FieldBlock<S>

Source

pub fn iter(&self) -> S::Iter<'_>

Source

pub fn get(&self, name: &[u8]) -> Option<&[u8]>

Source§

impl FieldBlock<Vec<OwnedField>>

Source

pub const fn new() -> Self

Source

pub fn push(&mut self, name: &[u8], value: &[u8])

Source

pub fn as_slice(&self) -> &[OwnedField]

Source§

impl FieldBlock<PackedFields<Pooled>>

Source

pub fn from_pooled(pooled: Pooled) -> Self

Source

pub fn from_fields(fields: &[Field<'_>]) -> Result<Self, PoolLayoutError>

Source

pub fn from_headers(fields: &[Field<'_>]) -> Result<Self, PoolLayoutError>

Source

pub fn append(&mut self, other: Self) -> Result<(), Self>

Source

pub fn to_owned(&self) -> Vec<OwnedField>

Source§

impl FieldBlock<PackedFields<Vec<u8>>>

Source

pub const fn new() -> Self

Source

pub fn with_capacity(capacity: usize) -> Self

Source

pub fn push( &mut self, name: &[u8], value: &[u8], ) -> Result<(), PackedFieldError<Infallible>>

Source

pub fn push_encoded( &mut self, name: &[u8], value_len: usize, encode: impl FnOnce(&mut FieldValueWriter<'_>), ) -> Result<(), PackedFieldError<Infallible>>

Source

pub fn try_push_parts<E>( &mut self, encode_name: impl FnOnce(&mut FieldValueWriter<'_>) -> Result<(), E>, encode_value: impl FnOnce(&mut FieldValueWriter<'_>, usize) -> Result<(), E>, ) -> Result<(usize, usize), PackedFieldError<E>>

Source§

impl<S: AsRef<[u8]>> FieldBlock<PackedFields<S>>

Trait Implementations§

Source§

impl<S: Clone> Clone for FieldBlock<S>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<S: FieldStorage> Debug for FieldBlock<S>

Source§

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

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

impl Default for FieldBlock<Vec<OwnedField>>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Default for FieldBlock<PackedFields<Vec<u8>>>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<S: FieldStorage> Eq for FieldBlock<S>

Source§

impl<'a, S: FieldStorage> IntoIterator for &'a FieldBlock<S>

Source§

type Item = Field<'a>

The type of the elements being iterated over.
Source§

type IntoIter = <S as FieldStorage>::Iter<'a>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<S, T> PartialEq<FieldBlock<T>> for FieldBlock<S>

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more

Auto Trait Implementations§

§

impl<S> Freeze for FieldBlock<S>
where S: Freeze,

§

impl<S> RefUnwindSafe for FieldBlock<S>
where S: RefUnwindSafe,

§

impl<S> Send for FieldBlock<S>
where S: Send,

§

impl<S> Sync for FieldBlock<S>
where S: Sync,

§

impl<S> Unpin for FieldBlock<S>
where S: Unpin,

§

impl<S> UnsafeUnpin for FieldBlock<S>
where S: UnsafeUnpin,

§

impl<S> UnwindSafe for FieldBlock<S>
where S: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

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

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.