pub struct Connect<C>where
C: IpcConnection,{
pub endpoint: String,
pub session_label: Option<String>,
pub _phantom: PhantomData<fn() -> C>,
}Expand description
A command which is used by a node to actively connect to another node like a client.
A new session will be created if the operation is successful. The endpoint of the connection
will be used as the actor label of the new session actor. The user can provide a
session_label as an alias to the endpoint, both labels can be used to refer to the session
actor in the other commands.
The command will return the address if it succeeds, however users are not recommended to await
the result. The recommended way is to listen to the
NodeEvent::SessionCreated event which is emitted
when a session is created, and get the session address from the event.
Fields§
§endpoint: String§session_label: Option<String>§_phantom: PhantomData<fn() -> C>Implementations§
Trait Implementations§
Source§impl<C> Debug for Connect<C>where
C: IpcConnection,
impl<C> Debug for Connect<C>where
C: IpcConnection,
Auto Trait Implementations§
impl<C> Freeze for Connect<C>
impl<C> RefUnwindSafe for Connect<C>
impl<C> Send for Connect<C>
impl<C> Sync for Connect<C>
impl<C> Unpin for Connect<C>
impl<C> UnsafeUnpin for Connect<C>
impl<C> UnwindSafe for Connect<C>
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