pub trait NodeInterface<N: Network>: Routing<N> {
// Required method
fn shut_down<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn node_type(&self) -> NodeType { ... }
fn private_key(&self) -> &PrivateKey<N> { ... }
fn view_key(&self) -> &ViewKey<N> { ... }
fn address(&self) -> Address<N> { ... }
fn is_dev(&self) -> bool { ... }
fn handle_signals(shutdown_flag: Arc<AtomicBool>) -> Arc<OnceCell<Self>> { ... }
}
Required Methods§
Provided Methods§
Sourcefn private_key(&self) -> &PrivateKey<N>
fn private_key(&self) -> &PrivateKey<N>
Returns the account private key of the node.
Sourcefn handle_signals(shutdown_flag: Arc<AtomicBool>) -> Arc<OnceCell<Self>>
fn handle_signals(shutdown_flag: Arc<AtomicBool>) -> Arc<OnceCell<Self>>
Handles OS signals for the node to intercept and perform a clean shutdown.
The optional shutdown_flag
flag can be used to cleanly terminate the syncing process.
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.