pub enum WindowedSourceFile {
Plain(WindowedFile),
Spilled(SpillWindowedFile),
}Expand description
A seekable bounded source, with compressed input spooled only when the execution context explicitly permits temporary storage.
Variants§
Plain(WindowedFile)
Uncompressed source read directly from its file.
Spilled(SpillWindowedFile)
Decompressed bytes held in execution-owned spill storage.
Implementations§
Source§impl WindowedSourceFile
impl WindowedSourceFile
Sourcepub fn open(
path: impl AsRef<Path>,
max_window_bytes: usize,
context: &ExecutionContext,
) -> Result<Self, Diagnostic>
pub fn open( path: impl AsRef<Path>, max_window_bytes: usize, context: &ExecutionContext, ) -> Result<Self, Diagnostic>
Opens a plain, gzip or Zstandard file with bounded resident memory.
Compressed inputs require an enabled crate::TempStoragePolicy. The
spool is charged, checksummed and deleted with this source.
§Errors
Returns a registered I/O, codec, spill-budget or memory diagnostic.
Sourcepub const fn spill_bytes(&self) -> u64
pub const fn spill_bytes(&self) -> u64
Physical bytes currently retained in spill storage.
Trait Implementations§
Source§impl Debug for WindowedSourceFile
impl Debug for WindowedSourceFile
Source§impl SourceBytes for WindowedSourceFile
impl SourceBytes for WindowedSourceFile
Auto Trait Implementations§
impl Freeze for WindowedSourceFile
impl RefUnwindSafe for WindowedSourceFile
impl Send for WindowedSourceFile
impl Sync for WindowedSourceFile
impl Unpin for WindowedSourceFile
impl UnsafeUnpin for WindowedSourceFile
impl UnwindSafe for WindowedSourceFile
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
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 more