Struct itron_asp3::messagebuffer::MessageBufferRef [−][src]
pub struct MessageBufferRef<'a> { /* fields omitted */ }
unstable
and (crate features asp3
and messagebuf
, or crate features solid_asp3
and messagebuf
, or crate feature none
) only.Expand description
A borrowed reference to a message buffer.
Implementations
Get the raw object ID as abi::NonNullID
.
snd_mbf
: Send a message to the message buffer. Blocks the current task
if the message buffer is full.
pub fn send_timeout(
self,
message: &impl Unknown + ?Sized,
tmo: Timeout
) -> Result<(), Error<SendTimeoutError>>
pub fn send_timeout(
self,
message: &impl Unknown + ?Sized,
tmo: Timeout
) -> Result<(), Error<SendTimeoutError>>
tsnd_mbf
: Send a message to the message buffer. Blocks the current
task with timeout if the message buffer is full.
psnd_mbf
: Send a message to the message buffer. Fails and returns an
error if the message buffer is full.
rcv_mbf
: Receive a message from the message buffer. Blocks the current
task if the message buffer is empty.
On success, the received message will be written to *out
, and the
message size, measured in bytes, will be returned.
Rationale
This method is named recv
instead of receive
following the suit of
std::sync::mpsc::Receiver::recv
and std::net::UdpSocket::recv
.
Safety
*out
must be large enough to fit the message. After this method
overwrites *out
with the received message, the resultant content of
*out
must be valid for its type.
pub unsafe fn recv_timeout(
self,
out: &mut impl Unknown + ?Sized,
tmo: Timeout
) -> Result<usize, Error<RecvTimeoutError>>
pub unsafe fn recv_timeout(
self,
out: &mut impl Unknown + ?Sized,
tmo: Timeout
) -> Result<usize, Error<RecvTimeoutError>>
trcv_mbf
: Receive a message to the message buffer. Blocks the current
task with timeout if the message buffer is empty.
Safety
See Self::recv
.
prcv_mbf
: Receive a message to the message buffer. Fails and returns
an error if the message buffer is empty.
Safety
See Self::recv
.
ini_mbf
: Initialize the message buffer.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.