#[non_exhaustive]pub enum Event {
Handshake([u8; 32]),
DiscoveryKey(DiscoveryKey),
Channel(Channel),
Close(DiscoveryKey),
LocalSignal((String, Vec<u8>)),
}
Expand description
A protocol event.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Handshake([u8; 32])
Emitted after the handshake with the remote peer is complete. This is the first event (if the handshake is not disabled).
DiscoveryKey(DiscoveryKey)
Emitted when the remote peer opens a channel that we did not yet open.
Channel(Channel)
Emitted when a channel is established.
Close(DiscoveryKey)
Emitted when a channel is closed.
LocalSignal((String, Vec<u8>))
Convenience event to make it possible to signal the protocol from a channel. See channel.signal_local() and protocol.commands().signal_local().
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
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