pub struct ServiceDescriptor {
pub service_name: &'static str,
pub methods: &'static [&'static MethodDescriptor],
pub doc: Option<&'static str>,
}Expand description
Static descriptor for a roam RPC service.
Contains the service name and all method descriptors. Built once per service via OnceLock in macro-generated code.
Fields§
§service_name: &'static strService name (e.g., “Calculator”).
methods: &'static [&'static MethodDescriptor]All methods in this service.
doc: Option<&'static str>Documentation string, if any.
Implementations§
Source§impl ServiceDescriptor
impl ServiceDescriptor
Sourcepub fn by_id(&self, method_id: MethodId) -> Option<&'static MethodDescriptor>
pub fn by_id(&self, method_id: MethodId) -> Option<&'static MethodDescriptor>
Look up a method descriptor by method ID.
Source§impl ServiceDescriptor
impl ServiceDescriptor
Sourcepub const EMPTY: ServiceDescriptor
pub const EMPTY: ServiceDescriptor
An empty service descriptor for dispatchers that don’t serve any methods.
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