Skip to content

Commit

Permalink
from (Keyexp, Parameters) added
Browse files Browse the repository at this point in the history
  • Loading branch information
milyin committed Jun 9, 2024
1 parent 438804f commit a65686a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ impl StorageService {
// with `_time=[..]` to get historical data (in case of time-series)
let replies = match self
.session
.get(Selector::owned(&self.key_expr, "_time=[..]"))
.get((&self.key_expr, "_time=[..]"))
.target(QueryTarget::All)
.consolidation(ConsolidationMode::None)
.await
Expand Down
10 changes: 10 additions & 0 deletions zenoh/src/api/selector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ impl<'a> Selector<'a> {
}
}

impl<'a, K, P> From<(K, P)> for Selector<'a>
where
K: Into<KeyExpr<'a>>,
P: Into<Parameters<'a>>,
{
fn from((key_expr, parameters): (K, P)) -> Self {
Self::owned(key_expr, parameters)
}
}

impl<'a> From<Selector<'a>> for (KeyExpr<'a>, Parameters<'a>) {
fn from(selector: Selector<'a>) -> Self {
(
Expand Down

0 comments on commit a65686a

Please sign in to comment.