#[non_exhaustive]pub struct ServiceDescriptorProto {
pub name: String,
pub method: Vec<MethodDescriptorProto>,
pub options: Option<ServiceOptions>,
/* private fields */
}Expand description
Describes a service.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: String§method: Vec<MethodDescriptorProto>§options: Option<ServiceOptions>Implementations§
Source§impl ServiceDescriptorProto
impl ServiceDescriptorProto
pub fn new() -> Self
Sourcepub fn set_method<T, V>(self, v: T) -> Self
pub fn set_method<T, V>(self, v: T) -> Self
Sourcepub fn set_options<T>(self, v: T) -> Selfwhere
T: Into<ServiceOptions>,
pub fn set_options<T>(self, v: T) -> Selfwhere
T: Into<ServiceOptions>,
Sourcepub fn set_or_clear_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<ServiceOptions>,
pub fn set_or_clear_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<ServiceOptions>,
Trait Implementations§
Source§impl Clone for ServiceDescriptorProto
impl Clone for ServiceDescriptorProto
Source§fn clone(&self) -> ServiceDescriptorProto
fn clone(&self) -> ServiceDescriptorProto
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServiceDescriptorProto
impl Debug for ServiceDescriptorProto
Source§impl Default for ServiceDescriptorProto
impl Default for ServiceDescriptorProto
Source§fn default() -> ServiceDescriptorProto
fn default() -> ServiceDescriptorProto
Returns the “default value” for a type. Read more
Source§impl Message for ServiceDescriptorProto
impl Message for ServiceDescriptorProto
Source§impl PartialEq for ServiceDescriptorProto
impl PartialEq for ServiceDescriptorProto
impl StructuralPartialEq for ServiceDescriptorProto
Auto Trait Implementations§
impl Freeze for ServiceDescriptorProto
impl RefUnwindSafe for ServiceDescriptorProto
impl Send for ServiceDescriptorProto
impl Sync for ServiceDescriptorProto
impl Unpin for ServiceDescriptorProto
impl UnwindSafe for ServiceDescriptorProto
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