Trait little_stomper::destinations::Destination
source · 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