pub struct ServiceDescriptor {
pub name: String,
pub operations: Vec<OperationDescriptor>,
}Expand description
Service-Descriptor fuer Codegen — Sammlung von OperationDescriptors.
Fields§
§name: StringIDL-Interface-Name.
operations: Vec<OperationDescriptor>Operations in IDL-Reihenfolge.
Implementations§
Source§impl ServiceDescriptor
impl ServiceDescriptor
Sourcepub fn add_operation(
&mut self,
name: impl Into<String>,
one_way: bool,
in_params: Vec<String>,
out_params: Vec<String>,
) -> RpcResult<&OperationDescriptor>
pub fn add_operation( &mut self, name: impl Into<String>, one_way: bool, in_params: Vec<String>, out_params: Vec<String>, ) -> RpcResult<&OperationDescriptor>
Registriert eine Operation. Opcode wird automatisch vergeben.
§Errors
RpcError::Codec wenn die Operations-Anzahl u32::MAX
ueberschreitet.
Sourcepub fn operation(&self, name: &str) -> Option<&OperationDescriptor>
pub fn operation(&self, name: &str) -> Option<&OperationDescriptor>
Lookup nach Name.
Sourcepub fn operation_by_opcode(&self, opcode: u32) -> Option<&OperationDescriptor>
pub fn operation_by_opcode(&self, opcode: u32) -> Option<&OperationDescriptor>
Lookup nach Opcode.
Trait Implementations§
Source§impl Clone for ServiceDescriptor
impl Clone for ServiceDescriptor
Source§fn clone(&self) -> ServiceDescriptor
fn clone(&self) -> ServiceDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ServiceDescriptor
impl Debug for ServiceDescriptor
Source§impl Default for ServiceDescriptor
impl Default for ServiceDescriptor
Source§fn default() -> ServiceDescriptor
fn default() -> ServiceDescriptor
Returns the “default value” for a type. Read more
Source§impl PartialEq for ServiceDescriptor
impl PartialEq for ServiceDescriptor
Source§fn eq(&self, other: &ServiceDescriptor) -> bool
fn eq(&self, other: &ServiceDescriptor) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ServiceDescriptor
impl StructuralPartialEq for ServiceDescriptor
Auto Trait Implementations§
impl Freeze for ServiceDescriptor
impl RefUnwindSafe for ServiceDescriptor
impl Send for ServiceDescriptor
impl Sync for ServiceDescriptor
impl Unpin for ServiceDescriptor
impl UnsafeUnpin for ServiceDescriptor
impl UnwindSafe for ServiceDescriptor
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