pub struct Node<State = Building>(/* private fields */);Implementations§
Source§impl Node<Bound>
impl Node<Bound>
pub fn public_key(&self) -> PublicKey
pub fn endpoint_addr(&self) -> EndpointAddr
pub fn endpoint(&self) -> &Endpoint
pub async fn start(self) -> Result<Node<Running>, StartError>
Source§impl Node<Running>
impl Node<Running>
pub fn public_key(&self) -> PublicKey
pub fn endpoint_addr(&self) -> EndpointAddr
pub fn endpoint(&self) -> &Endpoint
pub fn is_closed(&self) -> bool
pub fn closed(&self) -> EndpointClosed ⓘ
pub async fn terminate(self) -> Result<Node<Terminating>, TerminateError>
pub async fn online(&self)
pub fn add_peer(&mut self, endpoint: impl Into<EndpointId>)
pub async fn ping( &self, peer_addr: impl Into<EndpointAddr>, ) -> Result<Duration, PingError>
pub async fn connect( &self, peer_addr: impl Into<EndpointAddr>, ) -> Result<PeerConnection, ConnectError>
pub async fn subscribe( &self, topic: impl Into<Topic>, ) -> Result<TopicSubscription, SubscribeError>
pub async fn subscribe_and_join( &self, topic: impl Into<Topic>, ) -> Result<TopicSubscription, SubscribeError>
Trait Implementations§
Auto Trait Implementations§
impl<State> Freeze for Node<State>where
State: Freeze,
impl<State> RefUnwindSafe for Node<State>where
State: RefUnwindSafe,
impl<State> Send for Node<State>where
State: Send,
impl<State> Sync for Node<State>where
State: Sync,
impl<State> Unpin for Node<State>where
State: Unpin,
impl<State> UnsafeUnpin for Node<State>where
State: UnsafeUnpin,
impl<State> UnwindSafe for Node<State>where
State: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more