pub struct MappedService<T = ()> {
pub handler: Option<Box<RpcMethod<T>>>,
pub this: T,
/* private fields */
}Expand description
The default and common Service implementation
Fields§
§handler: Option<Box<RpcMethod<T>>>The final handler, if no registered method can be found
this: TAssociated data for this service
Implementations§
Source§impl<T> MappedService<T>
impl<T> MappedService<T>
Source§impl<T: Send + Sync + 'static> MappedService<T>
impl<T: Send + Sync + 'static> MappedService<T>
pub fn add<'a, M: Serialize, A: 'a, R: 'a>( &self, m: M, method: impl SerdeMethod<'a, A, R, T>, )
pub fn next_method(&self) -> u32
Trait Implementations§
Source§impl<T: Default> Default for MappedService<T>
impl<T: Default> Default for MappedService<T>
Auto Trait Implementations§
impl<T = ()> !Freeze for MappedService<T>
impl<T = ()> !RefUnwindSafe for MappedService<T>
impl<T> Send for MappedService<T>where
T: Send,
impl<T> Sync for MappedService<T>where
T: Sync,
impl<T> Unpin for MappedService<T>where
T: Unpin,
impl<T = ()> !UnwindSafe for MappedService<T>
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