Skip to main content

TopologyLocalServerHandler

Trait TopologyLocalServerHandler 

Source
pub trait TopologyLocalServerHandler<___T: Transport = Channel> {
    // Required methods
    fn add_element(
        &mut self,
        request: Request<AddElement, ___T>,
        responder: Responder<AddElement, ___T>,
    ) -> impl Future<Output = ()>;
    fn lease(
        &mut self,
        request: Request<Lease, ___T>,
        responder: Responder<Lease, ___T>,
    ) -> impl Future<Output = ()>;

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

A server handler for the Topology protocol.

See Topology for more details.

Required Methods§

Source

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

Called by a Power Element owner to register a new Power Element and open control channels for that element.

Source

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

Called by a client to directly open a lease on the given dependencies without the need for creating and managing a new element.

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> TopologyLocalServerHandler<___T> for Local<___H>
where ___H: TopologyServerHandler<___T>, ___T: Transport,

Source§

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

Source§

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

Source§

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

Implementors§