Trait Handler

Source
pub trait Handler {
    // Provided methods
    fn hook(&self) -> Arc<dyn Hook> { ... }
    fn request(
        &mut self,
        method: &str,
        params: Params<'_>,
        cx: RequestContext<'_>,
    ) -> Result<Response> { ... }
    fn notification(
        &mut self,
        method: &str,
        params: Params<'_>,
        cx: NotificationContext<'_>,
    ) -> Result<Response> { ... }
}

Provided Methods§

Source

fn hook(&self) -> Arc<dyn Hook>

Source

fn request( &mut self, method: &str, params: Params<'_>, cx: RequestContext<'_>, ) -> Result<Response>

Source

fn notification( &mut self, method: &str, params: Params<'_>, cx: NotificationContext<'_>, ) -> Result<Response>

Implementations on Foreign Types§

Source§

impl Handler for ()

Implementors§