pub enum RaknetEvent {
Server(RaknetServerEvent),
Client(RaknetClientEvent),
Proxy(RaknetRelayProxyEvent),
}Variants§
Implementations§
Source§impl RaknetEvent
impl RaknetEvent
pub fn source(&self) -> RaknetEventSource
pub fn kind(&self) -> RaknetEventKind
pub fn peer_id(&self) -> Option<PeerId>
pub fn primary_addr(&self) -> Option<SocketAddr>
pub fn payload_len(&self) -> Option<usize>
pub fn decode_error(&self) -> Option<&str>
pub fn metrics_snapshot( &self, ) -> Option<(usize, &TransportMetricsSnapshot, u64)>
pub fn as_server(&self) -> Option<&RaknetServerEvent>
pub fn as_client(&self) -> Option<&RaknetClientEvent>
pub fn as_proxy(&self) -> Option<&RaknetRelayProxyEvent>
Trait Implementations§
Source§impl Debug for RaknetEvent
impl Debug for RaknetEvent
Source§impl From<RaknetClientEvent> for RaknetEvent
impl From<RaknetClientEvent> for RaknetEvent
Source§fn from(value: RaknetClientEvent) -> Self
fn from(value: RaknetClientEvent) -> Self
Converts to this type from the input type.
Source§impl From<RaknetRelayProxyEvent> for RaknetEvent
impl From<RaknetRelayProxyEvent> for RaknetEvent
Source§fn from(value: RaknetRelayProxyEvent) -> Self
fn from(value: RaknetRelayProxyEvent) -> Self
Converts to this type from the input type.
Source§impl From<RaknetServerEvent> for RaknetEvent
impl From<RaknetServerEvent> for RaknetEvent
Source§fn from(value: RaknetServerEvent) -> Self
fn from(value: RaknetServerEvent) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for RaknetEvent
impl RefUnwindSafe for RaknetEvent
impl Send for RaknetEvent
impl Sync for RaknetEvent
impl Unpin for RaknetEvent
impl UnsafeUnpin for RaknetEvent
impl UnwindSafe for RaknetEvent
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