Struct magic_wormhole::forwarding::ConnectOffer
source · [−]Expand description
Fields
mapping: Vec<(u16, Rc<String>)>Implementations
sourceimpl ConnectOffer
impl ConnectOffer
sourcepub async fn accept(
self,
cancel: impl Future<Output = ()>
) -> Result<(), ForwardingError>
pub async fn accept(
self,
cancel: impl Future<Output = ()>
) -> Result<(), ForwardingError>
Accept the offer and start the forwarding
The method will run until an error occurs, the peer terminates the connection
or cancel resolves. The last one can be used to provide timeouts or to inject CTRL-C
handling. If you want the forward to never (successfully) stop, pass [futures::future::pending()]
as the value.
sourcepub async fn reject(self) -> Result<(), ForwardingError>
pub async fn reject(self) -> Result<(), ForwardingError>
Reject the offer
This will send an error message to the other side so that it knows the transfer failed.
Auto Trait Implementations
impl RefUnwindSafe for ConnectOffer
impl !Send for ConnectOffer
impl !Sync for ConnectOffer
impl Unpin for ConnectOffer
impl UnwindSafe for ConnectOffer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more