pub struct DefaultTopic;Expand description
Default topic for simple systems that don’t need topic-based routing.
Use DefaultTopic when you don’t need topic-based filtering and want
all actors to receive all events. This is the simplest routing strategy,
acting as an identity/unit type for the topic system.
§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 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