Skip to main content

SubscriptionCapabilityHandler

Trait SubscriptionCapabilityHandler 

Source
pub trait SubscriptionCapabilityHandler {
    // Required method
    fn subscribe(
        &mut self,
        method: &str,
        input: UiValue,
    ) -> Result<SubscriptionWork, String>;
}

Required Methods§

Source

fn subscribe( &mut self, method: &str, input: UiValue, ) -> Result<SubscriptionWork, String>

Build continuous producer work after input validation.

The returned SubscriptionWork is the producer loop. It must remain running for as long as external code may use the emitter; returning from it closes the subscription immediately.

§Errors

Returns a human-readable setup error before subscription startup.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§