pub struct Stream<'scope, T> { /* private fields */ }Expand description
A stream for sending messages to a registration
Implementations§
Source§impl<'scope, T> Stream<'scope, T>
impl<'scope, T> Stream<'scope, T>
Sourcepub fn new(registration: &'scope mut Registration) -> Self
pub fn new(registration: &'scope mut Registration) -> Self
Creates a new stream from a mutable reference to a registration.
Sourcepub fn send_message_ne(&mut self, message: Message<T>)
pub fn send_message_ne(&mut self, message: Message<T>)
Sends a network-endian (big-endian) message to the registration
Since the message is in network order, then it is sent without performing an endian swap.
Sourcepub fn into_inner(self) -> &'scope mut Registration
pub fn into_inner(self) -> &'scope mut Registration
Consumes the stream and returns the underlying registration reference.
Source§impl<'scope, T: EndianSwap> Stream<'scope, T>
impl<'scope, T: EndianSwap> Stream<'scope, T>
Sourcepub unsafe fn send_message(&mut self, message: Message<T>)
pub unsafe fn send_message(&mut self, message: Message<T>)
Sends a message to the registration after performing endian swap to network order.
§Safety
The caller must ensure that if messages contains a variable length array that elements
indexed from 0 up to the contents of the length field are initialised and contained within
the memory allocated for the object.
Auto Trait Implementations§
impl<'scope, T> Freeze for Stream<'scope, T>
impl<'scope, T> !RefUnwindSafe for Stream<'scope, T>
impl<'scope, T> !Send for Stream<'scope, T>
impl<'scope, T> !Sync for Stream<'scope, T>
impl<'scope, T> Unpin for Stream<'scope, T>where
T: Unpin,
impl<'scope, T> UnsafeUnpin for Stream<'scope, T>
impl<'scope, T> !UnwindSafe for Stream<'scope, T>
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