pub struct TransitConnector { /* private fields */ }👎Deprecated since 0.7.0: This will be a private type in the future. Open an issue if you require access to protocol intrinsics in the future
Expand description
Implementations§
source§impl TransitConnector
impl TransitConnector
sourcepub fn our_abilities(&self) -> &Abilities
pub fn our_abilities(&self) -> &Abilities
The abilities that we’ve sent to the other side
sourcepub async fn connect(
self,
is_leader: bool,
transit_key: Key<TransitKey>,
their_abilities: Abilities,
their_hints: Arc<Hints>,
) -> Result<(Transit, TransitInfo), TransitConnectError>
pub async fn connect( self, is_leader: bool, transit_key: Key<TransitKey>, their_abilities: Abilities, their_hints: Arc<Hints>, ) -> Result<(Transit, TransitInfo), TransitConnectError>
Forwards to either leader_connect or follower_connect.
It usually is better to call the respective functions directly by their name, as it makes them less easy to confuse (confusion may still happen though). Nevertheless, sometimes it is desirable to use the same code for both sides and only track the side with a boolean.
sourcepub async fn leader_connect(
self,
transit_key: Key<TransitKey>,
their_abilities: Abilities,
their_hints: Arc<Hints>,
) -> Result<(Transit, TransitInfo), TransitConnectError>
pub async fn leader_connect( self, transit_key: Key<TransitKey>, their_abilities: Abilities, their_hints: Arc<Hints>, ) -> Result<(Transit, TransitInfo), TransitConnectError>
Connect to the other side, as sender.
sourcepub async fn follower_connect(
self,
transit_key: Key<TransitKey>,
their_abilities: Abilities,
their_hints: Arc<Hints>,
) -> Result<(Transit, TransitInfo), TransitConnectError>
pub async fn follower_connect( self, transit_key: Key<TransitKey>, their_abilities: Abilities, their_hints: Arc<Hints>, ) -> Result<(Transit, TransitInfo), TransitConnectError>
Connect to the other side, as receiver
Auto Trait Implementations§
impl Freeze for TransitConnector
impl RefUnwindSafe for TransitConnector
impl Send for TransitConnector
impl Sync for TransitConnector
impl Unpin for TransitConnector
impl UnwindSafe for TransitConnector
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