[−][src]Struct revent::example::ExampleHub
Hub of events.
Contains various topics which can be emitted into or subscribed to.
Fields
event1: Topic<dyn EventHandler>
Channel for the given type of event handler.
event2: Topic<dyn EventHandler>
Channel for the given type of event handler.
Methods
impl ExampleHub
[src]
pub fn new() -> Self
[src]
Create a new hub.
pub fn subscribe<T: Subscriber + Selfscriber<Self>>(&mut self, input: T::Input) where
T::Hub: for<'a> TryFrom<&'a Self, Error = ()>,
[src]
T::Hub: for<'a> TryFrom<&'a Self, Error = ()>,
Insert a subscriber into the hub.
Requires the trait Subscriber and Selfscriber
. Selfscriber is implemented by
creating a derivative hub. See the examples/
directory for usage.
pub fn graph(&self) -> String
[src]
Generate a graphviz (dot) style graph.
Trait Implementations
impl Default for ExampleHub
[src]
impl Drop for ExampleHub
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ExampleHub
impl Send for ExampleHub
impl !Sync for ExampleHub
impl Unpin for ExampleHub
impl !UnwindSafe for ExampleHub
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,