pub struct Hooks<'a> {
pub copied: &'a mut dyn FnMut(u8),
pub progress: &'a mut dyn FnMut(u64, u64),
pub needed: &'a mut dyn FnMut(u64, u64),
pub consumed: &'a mut dyn FnMut(u64, u64),
pub settle: &'a mut dyn FnMut(&mut dyn Write) -> Result<()>,
}Expand description
What assemble_with reports while it writes.
Fields§
§copied: &'a mut dyn FnMut(u8)Called once each data section (a kind of DICT_DATA, INDEX_DATA,
QUAD_DATA, LABEL_DATA, TEXT_DATA or PYRAMID) is in the output:
the input bytes it came from are not read again.
progress: &'a mut dyn FnMut(u64, u64)(data bytes written so far, data bytes in all), after each write.
needed: &'a mut dyn FnMut(u64, u64)(input offset, length) of every payload range the copy will read,
announced once before the first byte is written.
consumed: &'a mut dyn FnMut(u64, u64)(input offset, length) of a payload range now in the output, whatever
order the ranges come in. Once every announced range of a spill file
has been consumed, nothing reads that file again.
settle: &'a mut dyn FnMut(&mut dyn Write) -> Result<()>Called with the output after every copied run and every finished data
section, once consumed / copied may have made spill files ready to
go. The implementation flushes out, makes the bytes durable, and only
then deletes: a file must never be removed while its bytes are still in
a buffer or an unsynced page.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Hooks<'a>
impl<'a> !Send for Hooks<'a>
impl<'a> !Sync for Hooks<'a>
impl<'a> !UnwindSafe for Hooks<'a>
impl<'a> Freeze for Hooks<'a>
impl<'a> Unpin for Hooks<'a>
impl<'a> UnsafeUnpin for Hooks<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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