pub struct NetBufferProducer { /* private fields */ }Expand description
Producer side of the network buffer (used in network thread).
Implementations§
Source§impl NetBufferProducer
impl NetBufferProducer
Sourcepub fn try_send(&mut self, message: NetMessage) -> bool
pub fn try_send(&mut self, message: NetMessage) -> bool
Try to send a network message to the consumer.
Returns true if the message was sent, false if the buffer was full.
This method is non-blocking and safe to call from any thread.
Auto Trait Implementations§
impl Freeze for NetBufferProducer
impl !RefUnwindSafe for NetBufferProducer
impl Send for NetBufferProducer
impl Sync for NetBufferProducer
impl Unpin for NetBufferProducer
impl !UnwindSafe for NetBufferProducer
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