pub struct TransformerChain { /* private fields */ }Expand description
Transformers applied in sequence.
An empty chain is free: the run skips it entirely rather than allocating a
Vec per event.
Implementations§
Source§impl TransformerChain
impl TransformerChain
Sourcepub fn with(self, transformer: impl StreamTransformer + 'static) -> Self
pub fn with(self, transformer: impl StreamTransformer + 'static) -> Self
Appends a transformer, returning the chain for further building.
Sourcepub fn push(&mut self, transformer: impl StreamTransformer + 'static)
pub fn push(&mut self, transformer: impl StreamTransformer + 'static)
Appends a transformer.
Trait Implementations§
Source§impl Debug for TransformerChain
impl Debug for TransformerChain
Source§impl Default for TransformerChain
impl Default for TransformerChain
Source§impl StreamTransformer for TransformerChain
impl StreamTransformer for TransformerChain
Source§fn seed(&mut self, history: &[Message])
fn seed(&mut self, history: &[Message])
Every transformer in the chain learns the history as the request carries it: what one transformer would do to the history is a rewrite of the stream, and the history is not part of the stream.
Auto Trait Implementations§
impl !RefUnwindSafe for TransformerChain
impl !Sync for TransformerChain
impl !UnwindSafe for TransformerChain
impl Freeze for TransformerChain
impl Send for TransformerChain
impl Unpin for TransformerChain
impl UnsafeUnpin for TransformerChain
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