pub struct OutboundReplyTransformChain { /* private fields */ }Expand description
Ordered chain of transformers. Cheap to clone (Arc), cheap to
call (returns the input directly when empty). Wire it onto the
agent runtime via the boot-time registration helper exposed in
the daemon’s setup code.
Implementations§
Source§impl OutboundReplyTransformChain
impl OutboundReplyTransformChain
Sourcepub fn from_vec(transformers: Vec<Arc<dyn OutboundReplyTransformer>>) -> Self
pub fn from_vec(transformers: Vec<Arc<dyn OutboundReplyTransformer>>) -> Self
Build from a pre-ordered list of transformers.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
true when no transformers are registered. Callers can use
this to skip the cloning of OutboundReplyContext on the
hot path.
Sourcepub fn ids(&self) -> Vec<String>
pub fn ids(&self) -> Vec<String>
Stable transformer ids in registration order — surfaced by admin diagnostics so operators can see what’s wired.
Sourcepub async fn run(
&self,
ctx: &OutboundReplyContext,
reply: OutboundReplyKind,
) -> Result<OutboundReplyKind, TransformError>
pub async fn run( &self, ctx: &OutboundReplyContext, reply: OutboundReplyKind, ) -> Result<OutboundReplyKind, TransformError>
Run the reply through each transformer in order. The first
Err short-circuits the chain.
Trait Implementations§
Source§impl Clone for OutboundReplyTransformChain
impl Clone for OutboundReplyTransformChain
Source§fn clone(&self) -> OutboundReplyTransformChain
fn clone(&self) -> OutboundReplyTransformChain
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 moreSource§impl Debug for OutboundReplyTransformChain
impl Debug for OutboundReplyTransformChain
Source§impl Default for OutboundReplyTransformChain
impl Default for OutboundReplyTransformChain
Source§fn default() -> OutboundReplyTransformChain
fn default() -> OutboundReplyTransformChain
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for OutboundReplyTransformChain
impl !UnwindSafe for OutboundReplyTransformChain
impl Freeze for OutboundReplyTransformChain
impl Send for OutboundReplyTransformChain
impl Sync for OutboundReplyTransformChain
impl Unpin for OutboundReplyTransformChain
impl UnsafeUnpin for OutboundReplyTransformChain
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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