pub trait NodeAdmin: Send + Sync {
// Required method
fn call<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
method: &'life1 str,
requester: &'life2 str,
body: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}Expand description
What a node does when an authorised controller asks it to run a node-admin method. The result is returned to the controller verbatim, so it must not contain secrets.
Required Methods§
Sourcefn call<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
method: &'life1 str,
requester: &'life2 str,
body: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn call<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
method: &'life1 str,
requester: &'life2 str,
body: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Run method for requester (its verified node id). Err is the
reason shown to the controller.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".