Trait rosrust::api::handlers::SubscriptionHandler
source · pub trait SubscriptionHandler<T>: Send + 'static {
// Required methods
fn connection(&mut self, headers: HashMap<String, String>);
fn message(&mut self, message: T, callerid: &str);
}
Expand description
Handles all calls involved with a subscription
Each subscription is done in one thread, so there is no synchronization necessary between these calls.
Required Methods§
sourcefn connection(&mut self, headers: HashMap<String, String>)
fn connection(&mut self, headers: HashMap<String, String>)
Called before any message is accepted from a certain caller ID
Contains the headers for handling the specific connection