pub struct DefaultTopic;Expand description
Unit topic for systems that don’t need topic-based routing.
Since every event maps to the same single topic, actors subscribing to
DefaultTopic will receive all events. This is the default generic
parameter on Supervisor, keeping simple setups
free of a custom topic type.
§Examples
ⓘ
use maiko::{Supervisor, DefaultTopic};
let mut sup = Supervisor::<MyEvent>::default();
sup.add_actor("actor", |ctx| MyActor { ctx }, &[DefaultTopic])?;Trait Implementations§
Source§impl Clone for DefaultTopic
impl Clone for DefaultTopic
Source§fn clone(&self) -> DefaultTopic
fn clone(&self) -> DefaultTopic
Returns a duplicate of the value. Read more
1.0.0 · 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 DefaultTopic
impl Debug for DefaultTopic
Source§impl Display for DefaultTopic
impl Display for DefaultTopic
Source§impl Hash for DefaultTopic
impl Hash for DefaultTopic
Source§impl PartialEq for DefaultTopic
impl PartialEq for DefaultTopic
Source§impl<E: Event> Topic<E> for DefaultTopic
impl<E: Event> Topic<E> for DefaultTopic
fn from_event(_event: &E) -> DefaultTopic
impl Eq for DefaultTopic
impl StructuralPartialEq for DefaultTopic
Auto Trait Implementations§
impl Freeze for DefaultTopic
impl RefUnwindSafe for DefaultTopic
impl Send for DefaultTopic
impl Sync for DefaultTopic
impl Unpin for DefaultTopic
impl UnsafeUnpin for DefaultTopic
impl UnwindSafe for DefaultTopic
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