Skip to main content

NodeLocalServerHandler

Trait NodeLocalServerHandler 

Source
pub trait NodeLocalServerHandler<___T: Transport = Channel> {
    // Required methods
    fn add_child(
        &mut self,
        request: Request<AddChild, ___T>,
        responder: Responder<AddChild, ___T>,
    ) -> impl Future<Output = ()>;
    fn provide_resource(
        &mut self,
        request: Request<ProvideResource, ___T>,
        responder: Responder<ProvideResource, ___T>,
    ) -> impl Future<Output = ()>;

    // Provided method
    fn on_unknown_interaction(
        &mut self,
        ordinal: u64,
    ) -> impl Future<Output = ()> { ... }
}
Expand description

A server handler for the Node protocol.

See Node for more details.

Required Methods§

Source

fn add_child( &mut self, request: Request<AddChild, ___T>, responder: Responder<AddChild, ___T>, ) -> impl Future<Output = ()>

Adds a child node to this node.

If node is present, this driver takes responsibility for binding to the newly created child. Otherwise, the driver framework will locate an appropriate driver to bind the child to.

Source

fn provide_resource( &mut self, request: Request<ProvideResource, ___T>, responder: Responder<ProvideResource, ___T>, ) -> impl Future<Output = ()>

Provides a resource that other nodes can depend on. The lifetime of the provided resource is tied to the controller client connection. Dropping the client connection will cause the resource to be removed.

Provided Methods§

Source

fn on_unknown_interaction(&mut self, ordinal: u64) -> impl Future<Output = ()>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<___H, ___T> NodeLocalServerHandler<___T> for Local<___H>
where ___H: NodeServerHandler<___T>, ___T: Transport,

Source§

async fn add_child( &mut self, request: Request<AddChild, ___T>, responder: Responder<AddChild, ___T>, )

Source§

async fn provide_resource( &mut self, request: Request<ProvideResource, ___T>, responder: Responder<ProvideResource, ___T>, )

Source§

async fn on_unknown_interaction(&mut self, ordinal: u64)

Implementors§