pub enum Subscriber<T: Resource> {
    OneCopy(Sender<Result<T>>),
    LinkedCopy(Option<Sender<Result<T>>>, Box<dyn Shutdown>, bool),
    DynCopy(ResourceRefBox<dyn Route<Event<T>>>),
}
Expand description

Subscriber variants

Variants

OneCopy(Sender<Result<T>>)

OneCopy subscriber will receive one copy of the resource once it’s available

LinkedCopy(Option<Sender<Result<T>>>, Box<dyn Shutdown>, bool)

LinkedOneCopy subscriber will receive one copy of the resource once it’s available, subscriber will get shutdown if the resource is replaced or dropped.

DynCopy(ResourceRefBox<dyn Route<Event<T>>>)

Subscriber will receive dynamic copies, pushed by the publisher, and Event::Dropped(..) will be pushed if the resource got dropped by the publisher. Bool flag is used to indicate wheith

Implementations

Create subscriber for one copy

Create linked subscriber for one copy hard_link: true links the subscriber if the publisher published new copy

Create subscriber for dynamic copies.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.