pub enum RelayEvent {
ConnectionEstablished {
session_id: u32,
peer_addr: SocketAddr,
},
DataReceived {
session_id: u32,
data: Vec<u8>,
},
ConnectionTerminated {
session_id: u32,
reason: String,
},
Error {
session_id: Option<u32>,
error: RelayError,
},
BandwidthLimitExceeded {
session_id: u32,
current_usage: u64,
limit: u64,
},
KeepAlive {
session_id: u32,
},
}
Expand description
Events that can occur during relay operation
Variants§
ConnectionEstablished
Connection established successfully
DataReceived
Data received from peer
ConnectionTerminated
Connection terminated
Fields
Error
Error occurred during relay operation
Fields
§
error: RelayError
Underlying error detail
BandwidthLimitExceeded
Bandwidth limit exceeded
Fields
KeepAlive
Keep-alive signal
Trait Implementations§
Source§impl Clone for RelayEvent
impl Clone for RelayEvent
Source§fn clone(&self) -> RelayEvent
fn clone(&self) -> RelayEvent
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 moreAuto Trait Implementations§
impl Freeze for RelayEvent
impl RefUnwindSafe for RelayEvent
impl Send for RelayEvent
impl Sync for RelayEvent
impl Unpin for RelayEvent
impl UnwindSafe for RelayEvent
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