-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ConsolidationMode moved into the API
- Loading branch information
Showing
5 changed files
with
34 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use crate::{common::ZExtUnknown, core::ConsolidationMode}; | ||
use crate::common::ZExtUnknown; | ||
use alloc::{string::String, vec::Vec}; | ||
|
||
/// The kind of consolidation. | ||
|
@@ -38,6 +38,8 @@ pub enum Consolidation { | |
} | ||
|
||
impl Consolidation { | ||
pub const DEFAULT: Self = Self::Auto; | ||
|
||
#[cfg(feature = "test")] | ||
pub fn rand() -> Self { | ||
use rand::prelude::SliceRandom; | ||
|
@@ -55,16 +57,6 @@ impl Consolidation { | |
} | ||
} | ||
|
||
impl From<ConsolidationMode> for Consolidation { | ||
fn from(val: ConsolidationMode) -> Self { | ||
match val { | ||
ConsolidationMode::None => Consolidation::None, | ||
ConsolidationMode::Monotonic => Consolidation::Monotonic, | ||
ConsolidationMode::Latest => Consolidation::Latest, | ||
} | ||
} | ||
} | ||
|
||
/// # Query message | ||
/// | ||
/// ```text | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters