#[non_exhaustive]pub struct CompactionOutput {
pub messages: Vec<Message>,
pub pinned: Vec<bool>,
}Expand description
Result of a successful CompactionStrategy::compact call.
messages and pinned are parallel: pinned[i] describes the
pin state of messages[i] in the post-compaction history. The
strategy is responsible for forwarding the pin state of every
message it preserves so the crate::History can keep its
internal mask consistent across compactions.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.messages: Vec<Message>Post-compaction message vector, in chronological order. Includes every pinned message from the input plus whatever tail the strategy chose to keep.
pinned: Vec<bool>Post-compaction pin mask, parallel to Self::messages. Every
pinned input message must remain true here; new entries
(e.g. summary placeholders) are typically false.
Implementations§
Trait Implementations§
Source§impl Clone for CompactionOutput
impl Clone for CompactionOutput
Source§fn clone(&self) -> CompactionOutput
fn clone(&self) -> CompactionOutput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CompactionOutput
impl RefUnwindSafe for CompactionOutput
impl Send for CompactionOutput
impl Sync for CompactionOutput
impl Unpin for CompactionOutput
impl UnsafeUnpin for CompactionOutput
impl UnwindSafe for CompactionOutput
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