#[repr(C)]pub struct MqAttr { /* private fields */ }
Expand description
A message-queue attribute, optionally used with mq_setattr
and
mq_getattr
and optionally mq_open
,
Implementations§
source§impl MqAttr
impl MqAttr
sourcepub fn new(
mq_flags: mq_attr_member_t,
mq_maxmsg: mq_attr_member_t,
mq_msgsize: mq_attr_member_t,
mq_curmsgs: mq_attr_member_t,
) -> MqAttr
pub fn new( mq_flags: mq_attr_member_t, mq_maxmsg: mq_attr_member_t, mq_msgsize: mq_attr_member_t, mq_curmsgs: mq_attr_member_t, ) -> MqAttr
Create a new message queue attribute
§Arguments
mq_flags
: Either0
orO_NONBLOCK
.mq_maxmsg
: Maximum number of messages on the queue.mq_msgsize
: Maximum message size in bytes.mq_curmsgs
: Number of messages currently in the queue.
sourcepub const fn flags(&self) -> mq_attr_member_t
pub const fn flags(&self) -> mq_attr_member_t
The current flags, either 0
or O_NONBLOCK
.
sourcepub const fn maxmsg(&self) -> mq_attr_member_t
pub const fn maxmsg(&self) -> mq_attr_member_t
The max number of messages that can be held by the queue
sourcepub const fn msgsize(&self) -> mq_attr_member_t
pub const fn msgsize(&self) -> mq_attr_member_t
The maximum size of each message (in bytes)
sourcepub const fn curmsgs(&self) -> mq_attr_member_t
pub const fn curmsgs(&self) -> mq_attr_member_t
The number of messages currently held in the queue
Trait Implementations§
impl Copy for MqAttr
impl Eq for MqAttr
impl StructuralPartialEq for MqAttr
Auto Trait Implementations§
impl Freeze for MqAttr
impl RefUnwindSafe for MqAttr
impl Send for MqAttr
impl Sync for MqAttr
impl Unpin for MqAttr
impl UnwindSafe for MqAttr
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)