pub struct ConnectOffer {
    pub mapping: Vec<(u16, Rc<String>)>,
    /* private fields */
}
Expand description

A pending forwarding offer from the other side

You should consume this object, either by calling accept or reject.

Fields

mapping: Vec<(u16, Rc<String>)>

Implementations

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.

Reject the offer

This will send an error message to the other side so that it knows the transfer failed.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.