Trait hrpc_build::Method
source · [−]pub trait Method {
type Comment: AsRef<str>;
fn name(&self) -> &str;
fn identifier(&self) -> &str;
fn client_streaming(&self) -> bool;
fn server_streaming(&self) -> bool;
fn comment(&self) -> &[Self::Comment];
fn options(&self) -> Vec<(String, String)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
;
fn request_response_name(
&self,
proto_path: &str
) -> (TokenStream, TokenStream);
}
Expand description
Method generation trait.
Each service contains a set of generic
Methods
’s that will be used by codegen
to generate abstraction implementations for
the provided methods.
Associated Types
Required methods
fn identifier(&self) -> &str
fn identifier(&self) -> &str
Identifier used to generate type name.
fn client_streaming(&self) -> bool
fn client_streaming(&self) -> bool
Method is streamed by client.
fn server_streaming(&self) -> bool
fn server_streaming(&self) -> bool
Method is streamed by server.
Get options of this item.
fn request_response_name(&self, proto_path: &str) -> (TokenStream, TokenStream)
fn request_response_name(&self, proto_path: &str) -> (TokenStream, TokenStream)
Type name of request and response.
Implementations on Foreign Types
sourceimpl Method for Method
impl Method for Method
type Comment = String
fn name(&self) -> &str
fn identifier(&self) -> &str
fn client_streaming(&self) -> bool
fn server_streaming(&self) -> bool
fn comment(&self) -> &[Self::Comment]
fn options(&self) -> Vec<(String, String)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,