Skip to main content

Lace

Struct Lace 

Source
pub struct Lace { /* private fields */ }

Implementations§

Source§

impl Lace

Source

pub fn memory(records: impl IntoIterator<Item = Record>) -> Self

Source

pub fn empty_memory() -> Self

Source

pub fn memory_with_capacity( records: impl IntoIterator<Item = Record>, bytes: usize, ) -> Result<Self>

A memory Lace holding at most bytes of canonical record bytes, counted once per record, so a duplicate holds nothing; indexes are not counted. Seeding records beyond it fails with LimitExceeded, as does the operation whose admission would exceed it, before anything is admitted; other operations continue. Close releases the held bytes; a record a reader still holds stays readable on its own.

Source

pub fn filesystem(path: impl AsRef<Path>) -> Result<Self>

Exclusively open a filesystem root until close or final owner drop. Share Lace handles instead of opening the same root again.

Source

pub fn portable( path: impl AsRef<Path>, format: PortableStoreFormat, ) -> Result<Self>

Exclusively open a portable file store root until close or final owner drop, creating it with format when the root is empty or absent; an existing root keeps the format it was created with. Share Lace handles instead of opening the same root again.

Source

pub fn with_operand_cache(self, entries: usize) -> Self

Hold at most entries received peer operands, most recently used first (default OperandCache::DEFAULT_ENTRIES); 0 holds none, so every peer operand crosses as a Blob.

Source

pub fn handle(&self) -> LaceHandle

Source

pub fn close(self) -> Result<()>

Stop new store access, drain already-started work, and release the adopted store and its profile ownership.

Auto Trait Implementations§

§

impl Freeze for Lace

§

impl RefUnwindSafe for Lace

§

impl Send for Lace

§

impl Sync for Lace

§

impl Unpin for Lace

§

impl UnsafeUnpin for Lace

§

impl UnwindSafe for Lace

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.