Trait Service
pub trait Service {
type Comment: AsRef<str>;
type Method: Method;
// Required methods
fn name(&self) -> &str;
fn package(&self) -> &str;
fn identifier(&self) -> &str;
fn methods(&self) -> &[Self::Method];
fn comment(&self) -> &[Self::Comment];
}Available on crate features
grpc and http only.Expand description
Service generation trait.
This trait can be implemented and consumed
by client::generate and server::generate
to allow any codegen module to generate service
abstractions.
Required Associated Types§
Required Methods§
fn identifier(&self) -> &str
fn identifier(&self) -> &str
Identifier used to generate type name.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".