pub struct RpcMethod<'a> {
pub ident: Ident<'a>,
pub snake_ident: Ident<'a>,
pub request_type: QualifiedIdent<'a>,
pub response_type: QualifiedIdent<'a>,
pub metadata: RpcMethodMetadata,
pub doc: Comment<'a>,
}Expand description
A method in an RPC service.
Fields§
§ident: Ident<'a>The name of the method.
snake_ident: Ident<'a>The snake name of the method.
request_type: QualifiedIdent<'a>The request type of the method.
response_type: QualifiedIdent<'a>The response type of the method.
metadata: RpcMethodMetadataMethod metadata.
doc: Comment<'a>Implementations§
Source§impl<'a> RpcMethod<'a>
impl<'a> RpcMethod<'a>
Sourcepub fn builder() -> RpcMethodBuilder<'a, ((), (), (), (), (), ())>
pub fn builder() -> RpcMethodBuilder<'a, ((), (), (), (), (), ())>
Create a builder for building RpcMethod.
On the builder, call .ident(...), .snake_ident(...), .request_type(...), .response_type(...), .metadata(...)(optional), .doc(...)(optional) to set the values of the fields (they accept Into values).
Finally, call .build() to create the instance of RpcMethod.
Trait Implementations§
impl<'a> StructuralPartialEq for RpcMethod<'a>
Auto Trait Implementations§
impl<'a> Freeze for RpcMethod<'a>
impl<'a> RefUnwindSafe for RpcMethod<'a>
impl<'a> Send for RpcMethod<'a>
impl<'a> Sync for RpcMethod<'a>
impl<'a> Unpin for RpcMethod<'a>
impl<'a> UnwindSafe for RpcMethod<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more