Skip to content

Commit

Permalink
- add docstrings
Browse files Browse the repository at this point in the history
- remove inner type accessor
  • Loading branch information
DenisBiryukov91 committed Feb 19, 2024
1 parent 85d8769 commit eb79877
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions zenoh/src/sample.rs
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ pub struct QoS {
}

impl QoS {
/// Get priority of the message.
pub fn priority(&self) -> Priority {
let priority = match Priority::try_from(self.inner.get_priority()) {
Ok(p) => p,
Expand All @@ -540,17 +541,15 @@ impl QoS {
priority
}

/// Get congestion control of the message.
pub fn congestion_control(&self) -> CongestionControl {
self.inner.get_congestion_control()
}

/// Get express flag value. If true, the message is not batched during transmission, in order to reduce latency.
pub fn express(&self) -> bool {
self.inner.is_express()
}

pub(crate) fn inner(&self) -> QoSType {
self.inner
}
}

impl From<QoSType> for QoS {
Expand Down

0 comments on commit eb79877

Please sign in to comment.