Trait XnodeController

Source
pub trait XnodeController: Send + Sync {
    // Required methods
    fn get_session(&self) -> &Session;
    fn check_controller(&self) -> impl Future<Output = Option<String>> + Send;
    fn controller_config(&self, controller: String) -> String;

    // Provided methods
    fn xnode_identifier(&self) -> String { ... }
    fn set_controller(
        &self,
        controller: Option<String>,
    ) -> impl Future<Output = Result<SetOutput, Error>> + Send { ... }
}

Required Methods§

Source

fn get_session(&self) -> &Session

Get session to update Xnode

Source

fn check_controller(&self) -> impl Future<Output = Option<String>> + Send

Decide who should be the current controller based on external data

Source

fn controller_config(&self, controller: String) -> String

Provided Methods§

Source

fn xnode_identifier(&self) -> String

Source

fn set_controller( &self, controller: Option<String>, ) -> impl Future<Output = Result<SetOutput, Error>> + Send

Set a new owner

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.

Implementors§