pub trait XnodeController: Send + Sync {
// Required methods
fn get_session(xnode: &Self) -> &Session;
fn check_controller(
xnode: &Self,
) -> impl Future<Output = Option<String>> + Send;
fn controller_config(xnode: &Self, controller: String) -> String;
// Provided methods
fn xnode_identifier(xnode: &Self) -> String { ... }
fn set_controller(
xnode: &Self,
controller: Option<String>,
) -> impl Future<Output = Result<SetOutput, Error>> + Send { ... }
}
Required Methods§
Sourcefn get_session(xnode: &Self) -> &Session
fn get_session(xnode: &Self) -> &Session
Get session to update Xnode
Sourcefn check_controller(xnode: &Self) -> impl Future<Output = Option<String>> + Send
fn check_controller(xnode: &Self) -> impl Future<Output = Option<String>> + Send
Decide who should be the current controller based on external data
fn controller_config(xnode: &Self, controller: String) -> String
Provided Methods§
fn xnode_identifier(xnode: &Self) -> String
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.