pub struct LocalSpillStore { /* private fields */ }Expand description
A SpillStore that writes temporary files to a local temp directory.
By default there is no disk cap. Use LocalSpillStore::with_cap to
configure one shared across every handle this store produces.
The scratch directory is created on the first SpillStore::new_spill
call, not at construction, so opening a dataset does not require a writable
temp directory. It is deleted when the store is dropped, cleaning up any
files whose handles have already been dropped.
Implementations§
Source§impl LocalSpillStore
impl LocalSpillStore
Sourcepub fn new() -> Result<Self>
pub fn new() -> Result<Self>
Create a store with no disk cap.
Construction does not touch the filesystem; the scratch directory is
created on the first SpillStore::new_spill call.
Sourcepub fn with_cap(cap_bytes: u64) -> Result<Self>
pub fn with_cap(cap_bytes: u64) -> Result<Self>
Create a store that returns lance_core::Error::DiskCapExceeded once
total bytes written across all live handles would exceed cap_bytes.
Trait Implementations§
Source§impl Default for LocalSpillStore
impl Default for LocalSpillStore
Auto Trait Implementations§
impl !Freeze for LocalSpillStore
impl !RefUnwindSafe for LocalSpillStore
impl !UnwindSafe for LocalSpillStore
impl Send for LocalSpillStore
impl Sync for LocalSpillStore
impl Unpin for LocalSpillStore
impl UnsafeUnpin for LocalSpillStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.