Enum litep2p::protocol::request_response::DialOptions
source · pub enum DialOptions {
Dial,
Reject,
}
Expand description
Dial behavior when sending requests.
Variants§
Dial
If the peer is not currently connected, attempt to dial them before sending a request.
If the dial succeeds, the request is sent to the peer once the peer has been registered to the protocol.
If the dial fails, RequestResponseError::Rejected
is returned.
Reject
If the peer is not connected, immediately reject the request and return
RequestResponseError::NotConnected
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DialOptions
impl RefUnwindSafe for DialOptions
impl Send for DialOptions
impl Sync for DialOptions
impl Unpin for DialOptions
impl UnwindSafe for DialOptions
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