#[repr(C)]pub struct MqAttr { /* private fields */ }
Available on crate feature
mqueue
only.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