Struct posix_mq::Queue
[−]
[src]
pub struct Queue { /* fields omitted */ }
Represents an open queue descriptor to a POSIX message queue. This carries information about the queue's limitations (i.e. maximum message size and maximum message count).
Methods
impl Queue
[src]
fn create(name: Name, max_pending: i64, max_size: i64) -> Result<Queue, Error>
[src]
Creates a new queue and fails if it already exists. By default the queue will be read/writable by the current user with no access for other users. Linux users can change this setting themselves by modifying the queue file in /dev/mqueue.
fn open(name: Name) -> Result<Queue, Error>
[src]
Opens an existing queue.
fn open_or_create(name: Name) -> Result<Queue, Error>
[src]
Opens an existing queue or creates a new queue with the OS default settings.
fn delete(self) -> Result<(), Error>
[src]
Delete a message queue from the system. This method will make the queue unavailable for other processes after their current queue descriptors have been closed.
fn send(&self, msg: &Message) -> Result<(), Error>
[src]
Send a message to the message queue. If the queue is full this call will block until a message has been consumed.
fn receive(&self) -> Result<Message, Error>
[src]
Receive a message from the message queue. If the queue is empty this call will block until a message arrives.