pub trait Destination: Send + Clone {
    type Client: Client;

    // Required methods
    fn subscribe<S: Subscriber + 'static, D: Deref<Target = S> + Send + Clone + 'static>(
        &self,
        sender_subscription_id: Option<SubscriptionId>,
        subscriber: D,
        client: &Self::Client
    );
    fn unsubscribe<S: Subscriber + 'static, D: Deref<Target = S> + Send + Clone + 'static>(
        &self,
        sub_id: SubscriptionId,
        subscriber: D,
        client: &Self::Client
    );
    fn send<S: Sender + 'static, D: Deref<Target = S> + Send + Clone + 'static>(
        &self,
        message: InboundMessage,
        sender: D,
        client: &Self::Client
    );
    fn close(&self);
}
Expand description

A destinations is a identifiable resource that clients can subscribe to, and send messages to

Required Associated Types§

Required Methods§

source

fn subscribe<S: Subscriber + 'static, D: Deref<Target = S> + Send + Clone + 'static>( &self, sender_subscription_id: Option<SubscriptionId>, subscriber: D, client: &Self::Client )

source

fn unsubscribe<S: Subscriber + 'static, D: Deref<Target = S> + Send + Clone + 'static>( &self, sub_id: SubscriptionId, subscriber: D, client: &Self::Client )

source

fn send<S: Sender + 'static, D: Deref<Target = S> + Send + Clone + 'static>( &self, message: InboundMessage, sender: D, client: &Self::Client )

source

fn close(&self)

Implementors§