Skip to main content

FrontierCodec

Struct FrontierCodec 

Source
pub struct FrontierCodec { /* private fields */ }
Expand description

A narrow frontier handle codec which keeps its live Store allocated.

Within a process, only the issuing instance decodes its unchanged rows. Another codec over the same Store does not recover them. There is no file import, restart or Store-compaction interface.

Implementations§

Source§

impl FrontierCodec

Source

pub fn new(store: Arc<Store>, variables: usize) -> Result<Self, Error>

Retains the Store and allocates a private, nonreused process lifetime token.

§Errors

The process exhausted its codec tokens or a row cannot fit address space.

Source

pub fn encode( &self, identity: &[Handle], original: &[Handle], ) -> Result<Vec<u8>, Error>

Encodes complete canonical and original rows without converting values.

§Errors

Wrong widths, transient/unknown/lazy handles, a noncanonical identity, poisoned Store, or allocation failure. No normalization is performed.

Source

pub fn decode(&self, bytes: &[u8]) -> Result<Rows, Error>

Decodes a checked enclosing frontier record from this exact live owner.

§Errors

Invalid version/token/width/length, unknown coordinates, transient/lazy values, a noncanonical identity, poisoned Store or allocation failure.

Trait Implementations§

Source§

impl Debug for FrontierCodec

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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.