Enum tentacle::service::TargetSession
source · pub enum TargetSession {
All,
Single(SessionId),
Multi(Box<dyn Iterator<Item = SessionId> + Send + 'static>),
Filter(Box<dyn FnMut(&SessionId) -> bool + Send + 'static>),
}
Expand description
When sending a message, select the specified session
Variants§
All
Try broadcast
Single(SessionId)
Try send to only one
Multi(Box<dyn Iterator<Item = SessionId> + Send + 'static>)
Try send to some determined session
Filter(Box<dyn FnMut(&SessionId) -> bool + Send + 'static>)
Try send to some session, if return true, send to it