[][src]Trait revent::Subscriber

pub trait Subscriber<T> where
    Self: Sized
{ type Input; fn build(hub: T, input: Self::Input) -> Self;
fn subscribe(hub: &T, shared: Shared<Self>); }

Subscriber to an event hub.

Is used by the subscribe function generated by the hub macro.

Associated Types

type Input

Input data to the build function.

Loading content...

Required methods

fn build(hub: T, input: Self::Input) -> Self

Build an object using any hub and arbitrary input.

fn subscribe(hub: &T, shared: Shared<Self>)

Subscribe to a specific hub.

This function wraps the self object inside an opaque wrapper which can be used on Topic::subscribe.

Loading content...

Implementors

Loading content...