[][src]Struct posix_mq::Queue

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]

pub 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.

pub fn open(name: Name) -> Result<Queue, Error>[src]

Opens an existing queue.

pub fn open_or_create(name: Name) -> Result<Queue, Error>[src]

Opens an existing queue or creates a new queue with the OS default settings.

pub 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.

pub 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.

pub 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.

pub fn max_pending(&self) -> i64[src]

pub fn max_size(&self) -> usize[src]

Trait Implementations

impl Debug for Queue[src]

impl Drop for Queue[src]

Auto Trait Implementations

impl RefUnwindSafe for Queue

impl Send for Queue

impl Sync for Queue

impl Unpin for Queue

impl UnwindSafe for Queue

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.