[][src]Crate pharos

Structs

Events

A stream of events. This is returned from Observable::observe.

ObserveConfig

Configuration for your event stream, passed to Observable::observe when subscribing. This let's you choose the type of channel and let's you set a filter to ignore certain events.

Pharos

The Pharos lighthouse. When you implement Observable on your type, you can forward the observe method to Pharos and call notify on it.

Enums

Channel

Choose the type of channel that will be used for your event stream. Used in ObserveConfig.

Filter

Predicate for filtering events. This is an enum because closures that capture variables from their environment need to be boxed. More often than not, an event will be a simple enum and the predicate will just match on the variant, so it would be wasteful to impose boxing in those cases, hence there is a function pointer variant which does not require boxing. This should be preferred where possible.

Traits

Observable

Indicate that a type is observable. You can call observe to get a stream of events.