pub struct SpillFile { /* private fields */ }Expand description
Append-only temporary file charged to one execution context.
Implementations§
Source§impl SpillFile
impl SpillFile
Sourcepub fn append(&mut self, payload: &[u8]) -> Result<(), SpillError>
pub fn append(&mut self, payload: &[u8]) -> Result<(), SpillError>
Appends one checksummed record without allocating.
§Errors
Returns an error without retaining a partial record or disk charge.
Sourcepub fn finish(self) -> Result<SpillArtifact, SpillError>
pub fn finish(self) -> Result<SpillArtifact, SpillError>
Flushes the writer and returns an immutable temporary artifact.
§Errors
Returns an I/O error if buffered bytes cannot reach the filesystem.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpillFile
impl RefUnwindSafe for SpillFile
impl Send for SpillFile
impl Sync for SpillFile
impl Unpin for SpillFile
impl UnsafeUnpin for SpillFile
impl UnwindSafe for SpillFile
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