pub struct AsyncCallback<F> { /* private fields */ }Expand description
A cloneable, thread-safe handle that injects a callback into the stage’s execution context. The callback is serialized with element processing: callbacks are buffered in a lock-protected queue and drained by the fused executor between element deliveries — the callback itself runs on the executor thread, not the invoker’s thread.
Implementations§
Source§impl<F> AsyncCallback<F>
impl<F> AsyncCallback<F>
pub fn invoke(&self, logic: &mut GraphStageLogic)
pub fn invoke_without_logic(&self)
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for AsyncCallback<F>
impl<F> RefUnwindSafe for AsyncCallback<F>where
F: RefUnwindSafe,
impl<F> Send for AsyncCallback<F>
impl<F> Sync for AsyncCallback<F>
impl<F> Unpin for AsyncCallback<F>
impl<F> UnsafeUnpin for AsyncCallback<F>
impl<F> UnwindSafe for AsyncCallback<F>where
F: RefUnwindSafe,
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> Message for T
impl<T> Message for T
Source§fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
Convert a BoxedMessage to this concrete type
Source§fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
Convert this message to a BoxedMessage