pub trait Service: Message {
type Reply: Schema;
const ADDRESS: &'static str;
const KEY: Option<&'static str>;
// Required methods
fn key(&self) -> Option<&str>;
fn address(&self) -> u32;
// Provided method
fn target(&self) -> String { ... }
}Expand description
A call the bus carries: its payload is Self, its answer a Service::Reply.
Required Associated Constants§
Sourceconst KEY: Option<&'static str>
const KEY: Option<&'static str>
The field whose value picks the provider’s branch (block_id: each
block answers its own), if it’s keyed — see crate::keyed.
Required Associated Types§
Required Methods§
Sourcefn address(&self) -> u32
fn address(&self) -> u32
Service::target’s number — the type’s own address cached.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".