pub struct PipelineCompactionStrategy { /* private fields */ }Expand description
Runs strategies in order, each on the previous one’s output (upstream
PipelineCompactionStrategy).
Implementations§
Source§impl PipelineCompactionStrategy
impl PipelineCompactionStrategy
Sourcepub fn new(
strategies: Vec<Arc<dyn AsyncCompactionStrategy>>,
) -> PipelineCompactionStrategy
pub fn new( strategies: Vec<Arc<dyn AsyncCompactionStrategy>>, ) -> PipelineCompactionStrategy
A pipeline of strategies.
Sourcepub fn strategies(&self) -> &[Arc<dyn AsyncCompactionStrategy>]
pub fn strategies(&self) -> &[Arc<dyn AsyncCompactionStrategy>]
The strategies, in order.
Trait Implementations§
Source§impl AsyncCompactionStrategy for PipelineCompactionStrategy
impl AsyncCompactionStrategy for PipelineCompactionStrategy
Source§fn compact_async<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
messages: &'life1 [Message],
tokenizer: &'life2 dyn Tokenizer,
) -> Pin<Box<dyn Future<Output = Vec<Message>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PipelineCompactionStrategy: 'async_trait,
fn compact_async<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
messages: &'life1 [Message],
tokenizer: &'life2 dyn Tokenizer,
) -> Pin<Box<dyn Future<Output = Vec<Message>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PipelineCompactionStrategy: 'async_trait,
Return the retained messages after compaction.
Source§impl Clone for PipelineCompactionStrategy
impl Clone for PipelineCompactionStrategy
Source§fn clone(&self) -> PipelineCompactionStrategy
fn clone(&self) -> PipelineCompactionStrategy
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 !RefUnwindSafe for PipelineCompactionStrategy
impl !UnwindSafe for PipelineCompactionStrategy
impl Freeze for PipelineCompactionStrategy
impl Send for PipelineCompactionStrategy
impl Sync for PipelineCompactionStrategy
impl Unpin for PipelineCompactionStrategy
impl UnsafeUnpin for PipelineCompactionStrategy
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