pub struct JsonPath(/* private fields */);Expand description
A dotted path into a JSON document, e.g. tenant_id or meta.tenant.
A deliberately small subset of JSONPath: a sequence of object keys. It does
not support array indexing or wildcards in M1, the partition key is a
scalar field on the document root or a nested object. The supported grammar
is version-tracked in docs/specs/opensearch-endpoints.md.
§Examples
use osproxy_spi::JsonPath;
let p = JsonPath::new("meta.tenant");
assert_eq!(p.segments().collect::<Vec<_>>(), ["meta", "tenant"]);Implementations§
Trait Implementations§
impl Eq for JsonPath
impl StructuralPartialEq for JsonPath
Auto Trait Implementations§
impl Freeze for JsonPath
impl RefUnwindSafe for JsonPath
impl Send for JsonPath
impl Sync for JsonPath
impl Unpin for JsonPath
impl UnsafeUnpin for JsonPath
impl UnwindSafe for JsonPath
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more