Skip to main content

EncoderStorage

Struct EncoderStorage 

Source
pub struct EncoderStorage<'a, P> {
    pub fields: ManagedSlice<'a, FieldInfo>,
    pub pred_indices: ManagedSlice<'a, usize>,
    pub field_to_pred: ManagedSlice<'a, Option<usize>>,
    pub predictors: ManagedSlice<'a, Option<P>>,
    pub predictor_fields: ManagedSlice<'a, usize>,
    pub since_refresh: ManagedSlice<'a, u64>,
    pub since_reset: ManagedSlice<'a, u64>,
    pub opaque_words: ManagedSlice<'a, u64>,
    pub opaque_bytes: ManagedSlice<'a, u8>,
}
Expand description

Borrowed storage for one encoder instance.

All slices must be sized from crate::storage::StorageLayout. They are zeroed by the engine during construction; no allocation occurs afterwards.

Fields§

§fields: ManagedSlice<'a, FieldInfo>§pred_indices: ManagedSlice<'a, usize>§field_to_pred: ManagedSlice<'a, Option<usize>>§predictors: ManagedSlice<'a, Option<P>>§predictor_fields: ManagedSlice<'a, usize>§since_refresh: ManagedSlice<'a, u64>§since_reset: ManagedSlice<'a, u64>§opaque_words: ManagedSlice<'a, u64>§opaque_bytes: ManagedSlice<'a, u8>

Implementations§

Source§

impl<'a, P> EncoderStorage<'a, P>

Source

pub fn borrowed( fields: &'a mut [FieldInfo], pred_indices: &'a mut [usize], field_to_pred: &'a mut [Option<usize>], predictors: &'a mut [Option<P>], predictor_fields: &'a mut [usize], since_refresh: &'a mut [u64], since_reset: &'a mut [u64], opaque_words: &'a mut [u64], opaque_bytes: &'a mut [u8], ) -> Self

Build borrowed storage from caller-provided slices.

Auto Trait Implementations§

§

impl<'a, P> !UnwindSafe for EncoderStorage<'a, P>

§

impl<'a, P> Freeze for EncoderStorage<'a, P>

§

impl<'a, P> RefUnwindSafe for EncoderStorage<'a, P>
where P: RefUnwindSafe,

§

impl<'a, P> Send for EncoderStorage<'a, P>
where P: Send,

§

impl<'a, P> Sync for EncoderStorage<'a, P>
where P: Sync,

§

impl<'a, P> Unpin for EncoderStorage<'a, P>
where P: Unpin,

§

impl<'a, P> UnsafeUnpin for EncoderStorage<'a, P>

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> 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, 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.