Trait overclock::core::Channel

source ·
pub trait Channel: Send + Sized {
    type Event: Send;
    type Handle: Send + Clone + Shutdown;
    type Inbox: Send + Sync;
    type Metric: Collector + Clone;

    // Required method
    fn channel<T>(
        self,
        scope_id: ScopeId
    ) -> (Self::Handle, Self::Inbox, AbortRegistration, Option<Self::Metric>, Option<Box<dyn Route<Self::Event>>>);

    // Provided method
    fn type_name() -> Cow<'static, str> { ... }
}
Expand description

Defines a channel which becomes a sender and receiver half

Required Associated Types§

source

type Event: Send

The channel Event type

source

type Handle: Send + Clone + Shutdown

The sender half of the channel

source

type Inbox: Send + Sync

The receiver half of the channel

source

type Metric: Collector + Clone

Metric Collector

Required Methods§

source

fn channel<T>( self, scope_id: ScopeId ) -> (Self::Handle, Self::Inbox, AbortRegistration, Option<Self::Metric>, Option<Box<dyn Route<Self::Event>>>)

Create a sender and receiver of the appropriate types

Provided Methods§

source

fn type_name() -> Cow<'static, str>

Get this channel’s name

Implementations on Foreign Types§

source§

impl Channel for Duration

Implementors§

source§

impl Channel for NullChannel

source§

impl Channel for TcpListenerStream

source§

impl<E: Send + 'static> Channel for AbortableUnboundedChannel<E>

source§

impl<E: Send + 'static, const C: usize> Channel for AbortableBoundedChannel<E, C>

source§

impl<E: ShutdownEvent + 'static> Channel for UnboundedChannel<E>

source§

impl<E: ShutdownEvent + 'static, const C: usize> Channel for BoundedChannel<E, C>

source§

impl<S> Channel for IoChannel<S>where S: Send + 'static + Sync,

source§

impl<T, B: Send + Sync + 'static> Channel for Marker<T, B>where T: Channel,

§

type Event = <T as Channel>::Event

§

type Handle = Marker<<T as Channel>::Handle, B>

§

type Inbox = <T as Channel>::Inbox

§

type Metric = <T as Channel>::Metric

source§

impl<const I: u64> Channel for IntervalChannel<I>