pub struct AddrWithAutoSpanContext<T: Actor> { /* private fields */ }
Expand description
Allows an actix Addr<WithSpanContext
This way, the sender side does not need to be concerned about attaching span contexts, e.g.
impl SomeOtherComponent {
pub fn new(sender: Sender
impl actix::Handler<WithSpanContext
let addr = SomeActor::spawn(…); let other = SomeOtherComponent::new( addr.with_auto_span_context().into_sender() // or .clone() on the addr if needed );
Trait Implementations§
Source§impl<M, S> CanSend<M> for AddrWithAutoSpanContext<S>
impl<M, S> CanSend<M> for AddrWithAutoSpanContext<S>
Source§impl<M, S> CanSend<MessageWithCallback<M, <M as Message>::Result>> for AddrWithAutoSpanContext<S>where
M: Message + Send + 'static,
M::Result: Send,
S: Actor,
Addr<S>: CanSend<MessageWithCallback<WithSpanContext<M>, M::Result>>,
impl<M, S> CanSend<MessageWithCallback<M, <M as Message>::Result>> for AddrWithAutoSpanContext<S>where
M: Message + Send + 'static,
M::Result: Send,
S: Actor,
Addr<S>: CanSend<MessageWithCallback<WithSpanContext<M>, M::Result>>,
fn send(&self, message: MessageWithCallback<M, M::Result>)
Auto Trait Implementations§
impl<T> Freeze for AddrWithAutoSpanContext<T>
impl<T> !RefUnwindSafe for AddrWithAutoSpanContext<T>
impl<T> Send for AddrWithAutoSpanContext<T>
impl<T> Sync for AddrWithAutoSpanContext<T>
impl<T> Unpin for AddrWithAutoSpanContext<T>
impl<T> !UnwindSafe for AddrWithAutoSpanContext<T>
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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<A, B> IntoMultiSender<B> for Awhere
B: MultiSenderFrom<A>,
impl<A, B> IntoMultiSender<B> for Awhere
B: MultiSenderFrom<A>,
fn as_multi_sender(self: &Arc<A>) -> B
fn into_multi_sender(self) -> B
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request