Struct magic_wormhole::rendezvous::RendezvousServer
source · pub struct RendezvousServer { /* private fields */ }
Implementations§
source§impl RendezvousServer
impl RendezvousServer
sourcepub async fn connect(
appid: &AppID,
relay_url: &str
) -> Result<(Self, Option<String>), RendezvousError>
pub async fn connect( appid: &AppID, relay_url: &str ) -> Result<(Self, Option<String>), RendezvousError>
Connect to the rendezvous server
This does the permission negotiation part if required and binds the
connection to the given appid
.
pub async fn send_peer_message( &mut self, phase: Phase, body: Vec<u8> ) -> Result<(), RendezvousError>
pub async fn next_peer_message_some( &mut self ) -> Result<EncryptedMessage, RendezvousError>
pub async fn next_peer_message( &mut self ) -> Result<Option<EncryptedMessage>, RendezvousError>
sourcepub async fn allocate_claim_open(
&mut self
) -> Result<(Nameplate, Mailbox), RendezvousError>
pub async fn allocate_claim_open( &mut self ) -> Result<(Nameplate, Mailbox), RendezvousError>
Allocate a nameplate, claim the mailbox and open it
sourcepub async fn claim_open(
&mut self,
nameplate: Nameplate
) -> Result<Mailbox, RendezvousError>
pub async fn claim_open( &mut self, nameplate: Nameplate ) -> Result<Mailbox, RendezvousError>
Claim a nameplate+mailbox and open it
pub fn needs_nameplate_release(&self) -> bool
pub async fn release_nameplate(&mut self) -> Result<(), RendezvousError>
sourcepub async fn open_directly(
&mut self,
mailbox: Mailbox
) -> Result<(), RendezvousError>
pub async fn open_directly( &mut self, mailbox: Mailbox ) -> Result<(), RendezvousError>
Open a mailbox while skipping the nameplate part.
This is the base functionality for seeds.
pub async fn shutdown(self, mood: Mood) -> Result<(), RendezvousError>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RendezvousServer
impl Send for RendezvousServer
impl Sync for RendezvousServer
impl Unpin for RendezvousServer
impl !UnwindSafe for RendezvousServer
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