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

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

Required Associated Types§

Required Methods§

source

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

source

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

source

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

Send a message to this destination and, by implication, all clients subscribed to it

Implementors§