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§
Sourcefn get_session(&self) -> &Session
fn get_session(&self) -> &Session
Get session to update Xnode
Sourcefn check_controller(&self) -> impl Future<Output = Option<String>> + Send
fn check_controller(&self) -> impl Future<Output = Option<String>> + Send
Decide who should be the current controller based on external data
fn controller_config(&self, controller: String) -> String
Provided Methods§
fn xnode_identifier(&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.