[−][src]Struct posix_mq::Queue
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]
name: Name,
max_pending: i64,
max_size: i64
) -> Result<Queue, Error>
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,