pub trait IsReady {
// Required methods
fn queue(&self) -> &SegQueue<GnsConnectionEvent>;
fn receive<const K: usize>(
&self,
messages: &mut [GnsNetworkMessage<ToReceive>; K],
) -> usize;
}
Expand description
Common functions available for any GnsSocket
state that is implementing it.
Regardless of being a client or server, a ready socket will allow us to query for connection events as well as receive messages.
Required Methods§
Sourcefn queue(&self) -> &SegQueue<GnsConnectionEvent>
fn queue(&self) -> &SegQueue<GnsConnectionEvent>
Return a reference to the connection event queue. The queue is thread-safe.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.