pub struct Node<KeyStorage: Storage> { /* private fields */ }Implementations§
source§impl<KeyStorage: Storage> Node<KeyStorage>
impl<KeyStorage: Storage> Node<KeyStorage>
pub async fn new(
config: Config,
rpc_addr: P2pAddr,
keychain: Keychain<KeyStorage>
) -> Result<Self>
sourcepub async fn run(&mut self) -> Result<()>
pub async fn run(&mut self) -> Result<()>
Starts the libp2p service networking stack. This Future resolves when shutdown occurs.
sourcepub fn network_events(&mut self) -> Receiver<NetworkEvent>
pub fn network_events(&mut self) -> Receiver<NetworkEvent>
Subscribe to NetworkEvents.
Trait Implementations§
Auto Trait Implementations§
impl<KeyStorage> !RefUnwindSafe for Node<KeyStorage>
impl<KeyStorage> Send for Node<KeyStorage>where
KeyStorage: Send,
impl<KeyStorage> !Sync for Node<KeyStorage>
impl<KeyStorage> Unpin for Node<KeyStorage>where
KeyStorage: Unpin,
impl<KeyStorage> !UnwindSafe for Node<KeyStorage>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request