pub struct DeadletterBox { /* private fields */ }Expand description
The default deadletter box
Simply logs every received message at the info level
and then discards it.
Implementations§
Source§impl DeadletterBox
impl DeadletterBox
Sourcepub fn new(notify_ready: KPromise<()>) -> DeadletterBox
pub fn new(notify_ready: KPromise<()>) -> DeadletterBox
Creates a new deadletter box
The notify_ready promise will be fulfilled, when the component
received a Start event.
Trait Implementations§
Source§impl Actor for DeadletterBox
impl Actor for DeadletterBox
Source§fn receive_local(
&mut self,
_msg: <DeadletterBox as Actor>::Message,
) -> Result<Handled, HandlerError>
fn receive_local( &mut self, _msg: <DeadletterBox as Actor>::Message, ) -> Result<Handled, HandlerError>
Handles local messages.
Source§fn receive_network(&mut self, msg: NetMessage) -> Result<Handled, HandlerError>
fn receive_network(&mut self, msg: NetMessage) -> Result<Handled, HandlerError>
Handles (serialised or reflected) messages from the network.
Source§impl ComponentDefinition for DeadletterBox
impl ComponentDefinition for DeadletterBox
Source§fn setup(&mut self, self_component: Arc<Component<DeadletterBox>>)
fn setup(&mut self, self_component: Arc<Component<DeadletterBox>>)
Prepare the component for being run Read more
Source§fn execute(&mut self, _max_events: usize, _skip: usize) -> ExecuteResult
fn execute(&mut self, _max_events: usize, _skip: usize) -> ExecuteResult
Execute events on the component’s ports Read more
Source§fn ctx_mut(&mut self) -> &mut ComponentContext<DeadletterBox>
fn ctx_mut(&mut self) -> &mut ComponentContext<DeadletterBox>
Return a mutable reference the component’s context field
Source§fn ctx(&self) -> &ComponentContext<DeadletterBox>
fn ctx(&self) -> &ComponentContext<DeadletterBox>
Return a reference the component’s context field
Source§fn spawn_local<F>(
&mut self,
f: impl FnOnce(ComponentDefinitionAccess<Self>) -> F,
)
fn spawn_local<F>( &mut self, f: impl FnOnce(ComponentDefinitionAccess<Self>) -> F, )
Run a Future on this component, allowing it mutable
access to the component’s internal state on every poll. Read more
Source§impl ComponentLifecycle for DeadletterBox
impl ComponentLifecycle for DeadletterBox
Source§impl DynamicPortAccess for DeadletterBox
impl DynamicPortAccess for DeadletterBox
Source§fn get_provided_port_as_any(
&mut self,
port_id: TypeId,
) -> Option<&mut (dyn Any + 'static)>
fn get_provided_port_as_any( &mut self, port_id: TypeId, ) -> Option<&mut (dyn Any + 'static)>
Internal API. Dynamically obtain a mutable reference to a
ProvidedPort if self
provides a port of the type indicated by the passed port_id. Read moreSource§fn get_required_port_as_any(
&mut self,
port_id: TypeId,
) -> Option<&mut (dyn Any + 'static)>
fn get_required_port_as_any( &mut self, port_id: TypeId, ) -> Option<&mut (dyn Any + 'static)>
Internal API. Dynamically obtain a mutable reference to a
RequiredPort if self
requires a port of the type indicated by the passed port_id. Read moreAuto Trait Implementations§
impl !Freeze for DeadletterBox
impl !RefUnwindSafe for DeadletterBox
impl Send for DeadletterBox
impl !Sync for DeadletterBox
impl Unpin for DeadletterBox
impl UnsafeUnpin for DeadletterBox
impl !UnwindSafe for DeadletterBox
Blanket Implementations§
Source§impl<CD> ActorPathFactory for CDwhere
CD: ComponentTraits,
impl<CD> ActorPathFactory for CDwhere
CD: ComponentTraits,
Source§fn actor_path(&self) -> ActorPath
fn actor_path(&self) -> ActorPath
Returns the associated actor path.
Source§impl<A, M> ActorRaw for Awhere
M: MessageBounds,
A: Actor<Message = M>,
impl<A, M> ActorRaw for Awhere
M: MessageBounds,
A: Actor<Message = M>,
Source§impl<CD> ActorRefFactory for CDwhere
CD: ComponentDefinition,
impl<CD> ActorRefFactory for CDwhere
CD: ComponentDefinition,
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<CD> ComponentLogging for CDwhere
CD: ComponentTraits + ComponentLifecycle,
impl<CD> ComponentLogging for CDwhere
CD: ComponentTraits + ComponentLifecycle,
Source§impl<CD> Dispatching for CDwhere
CD: ComponentTraits,
impl<CD> Dispatching for CDwhere
CD: ComponentTraits,
Source§fn dispatcher_ref(&self) -> ActorRefStrong<DispatchEnvelope>
fn dispatcher_ref(&self) -> ActorRefStrong<DispatchEnvelope>
Returns the associated dispatcher reference.
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<CD> Timer<CD> for CDwhere
CD: ComponentTraits,
impl<CD> Timer<CD> for CDwhere
CD: ComponentTraits,
Source§fn schedule_once<F>(&mut self, timeout: Duration, action: F) -> ScheduledTimer
fn schedule_once<F>(&mut self, timeout: Duration, action: F) -> ScheduledTimer
Source§fn schedule_periodic<F>(
&mut self,
delay: Duration,
period: Duration,
action: F,
) -> ScheduledTimer
fn schedule_periodic<F>( &mut self, delay: Duration, period: Duration, action: F, ) -> ScheduledTimer
Source§fn cancel_timer(&mut self, handle: ScheduledTimer)
fn cancel_timer(&mut self, handle: ScheduledTimer)
Cancel the timer indicated by the
handle Read more