summaryrefslogtreecommitdiff
path: root/src/mqueue.rs
diff options
context:
space:
mode:
authorfpagliughi <fpagliughi@mindspring.com>2021-12-26 12:43:01 -0500
committerfpagliughi <fpagliughi@mindspring.com>2021-12-27 13:50:13 -0500
commit80f447b2ac9accf3b2c341f1ab7f84a8b03b50e0 (patch)
tree111bf51f8bebc701653fd43fcf609188053b04e5 /src/mqueue.rs
parenta392647f450f88bf4a162135712ea023e8da3b1a (diff)
downloadnix-80f447b2ac9accf3b2c341f1ab7f84a8b03b50e0.zip
Added getters for the MqAttr struct
Diffstat (limited to 'src/mqueue.rs')
-rw-r--r--src/mqueue.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mqueue.rs b/src/mqueue.rs
index 564df4e4..20740b54 100644
--- a/src/mqueue.rs
+++ b/src/mqueue.rs
@@ -64,6 +64,21 @@ impl MqAttr {
pub const fn flags(&self) -> mq_attr_member_t {
self.mq_attr.mq_flags
}
+
+ /// The max number of messages that can be held by the queue
+ pub const fn maxmsg(&self) -> mq_attr_member_t {
+ self.mq_attr.mq_maxmsg
+ }
+
+ /// The maximum size of each message (in bytes)
+ pub const fn msgsize(&self) -> mq_attr_member_t {
+ self.mq_attr.mq_msgsize
+ }
+
+ /// The number of messages currently held in the queue
+ pub const fn curmsgs(&self) -> mq_attr_member_t {
+ self.mq_attr.mq_curmsgs
+ }
}