pub struct PersistableEntry {
pub key: u64,
pub table_id: u64,
pub schema_id: u64,
pub run_generation: u64,
pub entry_generation: u64,
pub bytes: usize,
pub payload_factory: Box<dyn FnOnce() -> Option<Vec<u8>> + Send + 'static>,
}Expand description
Cheap-to-share body for a queued store. The query thread constructs this
with raw data (Arc-shared rows, columns, footprint) plus a lazy
PersistableEntry::payload_factory. The factory captures the raw data
and produces the bincode-serialized bytes only when the worker invokes
it — keeping the query thread free of both serialization and I/O.
Fields§
§key: u64§table_id: u64§schema_id: u64§run_generation: u64§entry_generation: u64§bytes: usizeApproximate in-memory bytes; used for queue accounting.
payload_factory: Box<dyn FnOnce() -> Option<Vec<u8>> + Send + 'static>Lazy bincode payload producer. Invoked exactly once by the worker
thread; the query thread never executes it. Returns None if
bincode encoding fails.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PersistableEntry
impl !Sync for PersistableEntry
impl !UnwindSafe for PersistableEntry
impl Freeze for PersistableEntry
impl Send for PersistableEntry
impl Unpin for PersistableEntry
impl UnsafeUnpin for PersistableEntry
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