pub enum TransportEvent {
PoolHit {
peer_id: String,
timestamp: u64,
},
PoolMiss {
peer_id: String,
timestamp: u64,
},
PoolEvict {
peer_id: String,
timestamp: u64,
},
PathChange {
peer_id: String,
addr: String,
relay: bool,
timestamp: u64,
},
HandleSweep {
evicted: u64,
timestamp: u64,
},
}Expand description
A transport-level event emitted by the endpoint.
Serialised with serde for the FFI boundary. Adapters forward these as
CustomEvent('transport', { detail }) on the JS IrohNode instance.
Variants§
Implementations§
Source§impl TransportEvent
impl TransportEvent
pub fn pool_hit(peer_id: impl Into<String>) -> Self
pub fn pool_miss(peer_id: impl Into<String>) -> Self
pub fn pool_evict(peer_id: impl Into<String>) -> Self
pub fn path_change( peer_id: impl Into<String>, addr: impl Into<String>, relay: bool, ) -> Self
pub fn handle_sweep(evicted: u64) -> Self
Trait Implementations§
Source§impl Clone for TransportEvent
impl Clone for TransportEvent
Source§fn clone(&self) -> TransportEvent
fn clone(&self) -> TransportEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TransportEvent
impl Debug for TransportEvent
Auto Trait Implementations§
impl Freeze for TransportEvent
impl RefUnwindSafe for TransportEvent
impl Send for TransportEvent
impl Sync for TransportEvent
impl Unpin for TransportEvent
impl UnsafeUnpin for TransportEvent
impl UnwindSafe for TransportEvent
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