Enum Event
pub enum Event {
Show 13 variants
ReservationReqAccepted {
src_peer_id: PeerId,
renewed: bool,
},
ReservationReqAcceptFailed {
src_peer_id: PeerId,
error: Error,
},
ReservationReqDenied {
src_peer_id: PeerId,
status: StatusCode,
},
ReservationReqDenyFailed {
src_peer_id: PeerId,
error: Error,
},
ReservationClosed {
src_peer_id: PeerId,
},
ReservationTimedOut {
src_peer_id: PeerId,
},
CircuitReqDenied {
src_peer_id: PeerId,
dst_peer_id: PeerId,
status: StatusCode,
},
CircuitReqDenyFailed {
src_peer_id: PeerId,
dst_peer_id: PeerId,
error: Error,
},
CircuitReqAccepted {
src_peer_id: PeerId,
dst_peer_id: PeerId,
},
CircuitReqOutboundConnectFailed {
src_peer_id: PeerId,
dst_peer_id: PeerId,
error: Error,
},
CircuitReqAcceptFailed {
src_peer_id: PeerId,
dst_peer_id: PeerId,
error: Error,
},
CircuitClosed {
src_peer_id: PeerId,
dst_peer_id: PeerId,
error: Option<Error>,
},
StatusChanged {
status: Status,
},
}relay only.Expand description
The events produced by the relay Behaviour.
Variants§
ReservationReqAccepted
An inbound reservation request has been accepted.
Fields
ReservationReqAcceptFailed
Will be removed in favor of logging them internally, see https://github.com/libp2p/rust-libp2p/issues/4757 for details.
Accepting an inbound reservation request failed.
Fields
src_peer_id: PeerIdWill be removed in favor of logging them internally, see https://github.com/libp2p/rust-libp2p/issues/4757 for details.
error: ErrorWill be removed in favor of logging them internally, see https://github.com/libp2p/rust-libp2p/issues/4757 for details.
ReservationReqDenied
An inbound reservation request has been denied.
ReservationReqDenyFailed
Will be removed in favor of logging them internally, see https://github.com/libp2p/rust-libp2p/issues/4757 for details.
Denying an inbound reservation request has failed.
Fields
src_peer_id: PeerIdWill be removed in favor of logging them internally, see https://github.com/libp2p/rust-libp2p/issues/4757 for details.
error: ErrorWill be removed in favor of logging them internally, see https://github.com/libp2p/rust-libp2p/issues/4757 for details.
ReservationClosed
A reservation has been closed.
ReservationTimedOut
An inbound reservation has timed out.
CircuitReqDenied
An inbound circuit request has been denied.
CircuitReqDenyFailed
Will be removed in favor of logging them internally, see https://github.com/libp2p/rust-libp2p/issues/4757 for details.
Denying an inbound circuit request failed.
Fields
src_peer_id: PeerIdWill be removed in favor of logging them internally, see https://github.com/libp2p/rust-libp2p/issues/4757 for details.
dst_peer_id: PeerIdWill be removed in favor of logging them internally, see https://github.com/libp2p/rust-libp2p/issues/4757 for details.
error: ErrorWill be removed in favor of logging them internally, see https://github.com/libp2p/rust-libp2p/issues/4757 for details.
CircuitReqAccepted
An inbound circuit request has been accepted.
CircuitReqOutboundConnectFailed
Will be removed in favor of logging them internally, see https://github.com/libp2p/rust-libp2p/issues/4757 for details.
An outbound connect for an inbound circuit request failed.
Fields
src_peer_id: PeerIdWill be removed in favor of logging them internally, see https://github.com/libp2p/rust-libp2p/issues/4757 for details.
dst_peer_id: PeerIdWill be removed in favor of logging them internally, see https://github.com/libp2p/rust-libp2p/issues/4757 for details.
error: ErrorWill be removed in favor of logging them internally, see https://github.com/libp2p/rust-libp2p/issues/4757 for details.
CircuitReqAcceptFailed
Will be removed in favor of logging them internally, see https://github.com/libp2p/rust-libp2p/issues/4757 for details.
Accepting an inbound circuit request failed.
Fields
src_peer_id: PeerIdWill be removed in favor of logging them internally, see https://github.com/libp2p/rust-libp2p/issues/4757 for details.
dst_peer_id: PeerIdWill be removed in favor of logging them internally, see https://github.com/libp2p/rust-libp2p/issues/4757 for details.
error: ErrorWill be removed in favor of logging them internally, see https://github.com/libp2p/rust-libp2p/issues/4757 for details.
CircuitClosed
An inbound circuit has closed.
StatusChanged
Own Status changed.
This is triggered based on if the external address has been added or removed.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Event
impl !UnwindSafe for Event
impl Forget for Event
impl Freeze for Event
impl Move for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Eventwhere
*const () is !null: UnsafeUnpin,
PhantomData<ErrorData<CustomOwner>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more