pub trait Service {
// Required methods
fn can_handle_service(&self, service_name: &str) -> bool;
fn process_stream(
&mut self,
service_name: &str,
channel: Channel,
) -> Result<(), Error>;
}Expand description
Trait for providing a service.
Required Methods§
Sourcefn can_handle_service(&self, service_name: &str) -> bool
fn can_handle_service(&self, service_name: &str) -> bool
Returns true if this service can process the given service name, false otherwise.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".