Skip to content

Commit

Permalink
Use '[]' instead of '#' for fragments separator in Selector. For ecli…
Browse files Browse the repository at this point in the history
  • Loading branch information
JEnoch committed Dec 15, 2020
1 parent 40e135f commit 9c80a70
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub(crate) fn selector_of_string(s: String) -> PyResult<zenoh::Selector> {
///
/// Structure of a selector::
///
/// /s1/s2/.../sn?x>1&y<2&...&z=4(p1=v1;p2=v2;...;pn=vn)#a;b;x;y;...;z
/// /s1/s2/.../sn?x>1&y<2&...&z=4(p1=v1;p2=v2;...;pn=vn)[a;b;x;y;...;z]
/// | | | | | | | |
/// |-- expr ---| |--- filter --| |---- properties ---| |--fragment-|
///
Expand Down Expand Up @@ -96,19 +96,19 @@ impl Selector {
&self.s.predicate
}

/// the filter part of this Selector, if any (all characters after ``?`` and before ``(`` or ``#``)
/// the filter part of this Selector, if any (all characters after ``?`` and before ``(`` or ``[``)
#[getter]
fn filter(&self) -> Option<&str> {
self.s.filter.as_deref()
}

/// the properties part of this Selector (all characters between parenthesis and after ``?``)
/// the properties part of this Selector (all characters between ``( )`` and after ``?``)
#[getter]
fn properties(&self) -> HashMap<String, String> {
self.s.properties.0.clone()
}

/// the fragment part of this Selector, if any (all characters after ``#``)
/// the fragment part of this Selector, if any (all characters between ``[ ]`` and after `?`)
#[getter]
fn fragment(&self) -> Option<&str> {
self.s.fragment.as_deref()
Expand Down

0 comments on commit 9c80a70

Please sign in to comment.