pub trait Component {
    // Required methods
    fn handle(
        &self,
        invocation: Invocation,
        stream: PacketStream,
        data: Option<Value>,
        callback: Arc<RuntimeCallback>
    ) -> BoxFuture<'_, Result<PacketStream, ComponentError>>;
    fn list(&self) -> &ComponentSignature;

    // Provided method
    fn shutdown(&self) -> BoxFuture<'_, Result<(), ComponentError>> { ... }
}

Required Methods§

source

fn handle( &self, invocation: Invocation, stream: PacketStream, data: Option<Value>, callback: Arc<RuntimeCallback> ) -> BoxFuture<'_, Result<PacketStream, ComponentError>>

source

fn list(&self) -> &ComponentSignature

Provided Methods§

Implementors§