pub struct ServerPropagator { /* private fields */ }Expand description
Server-side CallInterceptor that extracts
extension-related metadata and headers from incoming requests.
The extracted data is stored in a PropagatorContext via task_local.
The handler must be wrapped in init_propagation for this to work.
ClientPropagator reads the stored context when making downstream calls.
Aligned with Go’s a2aext.NewServerPropagator.
Implementations§
Source§impl ServerPropagator
impl ServerPropagator
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new server propagator with default configuration.
Default behavior:
- Propagates metadata keys matching client-requested extension URIs
- Propagates the
x-a2a-extensionsheader
Sourcepub fn with_config(config: ServerPropagatorConfig) -> Self
pub fn with_config(config: ServerPropagatorConfig) -> Self
Creates a new server propagator with custom configuration.
Trait Implementations§
Source§impl CallInterceptor for ServerPropagator
impl CallInterceptor for ServerPropagator
Source§impl Debug for ServerPropagator
impl Debug for ServerPropagator
Auto Trait Implementations§
impl Freeze for ServerPropagator
impl !RefUnwindSafe for ServerPropagator
impl Send for ServerPropagator
impl Sync for ServerPropagator
impl Unpin for ServerPropagator
impl UnsafeUnpin for ServerPropagator
impl !UnwindSafe for ServerPropagator
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