[][src]Enum pharos::Channel

pub enum Channel {
    Bounded(usize),
    Unbounded,
    __NonExhaustive__,
}

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

Variants

Bounded(usize)

A channel with a limited message queue (the usize parameter). Creates back pressure when the buffer is full. This means that producer tasks may block if consumers can't process fast enough.

The minimum valid buffer size is 1.

Unbounded

A channel with unbounded capacity. Note that this may lead to unbounded memory consumption if producers outpace consumers.

__NonExhaustive__

This enum might grow in the future, thanks to this that won't be a breaking change.

Trait Implementations

impl<Event> From<Channel> for ObserveConfig<Event> where
    Event: Clone + 'static + Send
[src]

Create a ObserveConfig from a Channel, getting default values for other options.

impl Clone for Channel[src]

impl Copy for Channel[src]

impl Default for Channel[src]

impl Eq for Channel[src]

impl Ord for Channel[src]

impl PartialEq<Channel> for Channel[src]

impl PartialOrd<Channel> for Channel[src]

impl Debug for Channel[src]

impl StructuralPartialEq for Channel[src]

impl StructuralEq for Channel[src]

Auto Trait Implementations

impl Send for Channel

impl Sync for Channel

impl Unpin for Channel

impl UnwindSafe for Channel

impl RefUnwindSafe for Channel

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]