pub struct ServiceEntry {
pub id: ServiceId,
pub name: &'static str,
pub doc: String,
pub methods: HashMap<&'static str, MethodEntry>,
}Expand description
Information about an RPC service.
Fields§
§id: ServiceIdThe service’s unique ID within the registry.
name: &'static strThe service’s name (e.g., “Adder”).
doc: StringDocumentation string from the service trait’s /// comments.
methods: HashMap<&'static str, MethodEntry>Methods provided by this service, keyed by method name.
Implementations§
Source§impl ServiceEntry
impl ServiceEntry
Sourcepub fn method(&self, name: &str) -> Option<&MethodEntry>
pub fn method(&self, name: &str) -> Option<&MethodEntry>
Look up a method by name.
Sourcepub fn iter_methods(&self) -> impl Iterator<Item = &MethodEntry>
pub fn iter_methods(&self) -> impl Iterator<Item = &MethodEntry>
Iterate over all methods in this service.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ServiceEntry
impl RefUnwindSafe for ServiceEntry
impl Send for ServiceEntry
impl Sync for ServiceEntry
impl Unpin for ServiceEntry
impl UnwindSafe for ServiceEntry
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