⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

RpcService

Trait RpcService 

Source
pub trait RpcService: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn handle_method(
        &self,
        method_id: MethodId,
        params: &[u8],
    ) -> Result<Vec<u8>, RpcError>;
    fn methods(&self) -> Vec<MethodId>;
}
Expand description

RPC service handler trait

Required Methods§

Source

fn name(&self) -> &str

Get service name

Source

fn handle_method( &self, method_id: MethodId, params: &[u8], ) -> Result<Vec<u8>, RpcError>

Handle RPC method call

Source

fn methods(&self) -> Vec<MethodId>

Get list of supported methods

Implementors§