Trait JsonPath

Source
pub trait JsonPath: Queryable {
    // Provided methods
    fn query_with_path(&self, path: &str) -> Queried<Vec<QueryRef<'_, Self>>> { ... }
    fn query_only_path(&self, path: &str) -> Queried<Vec<QueryPath>> { ... }
    fn query(&self, path: &str) -> Queried<Vec<&Self>> { ... }
}
Expand description

A trait for types that can be queried with JSONPath.

Provided Methods§

Source

fn query_with_path(&self, path: &str) -> Queried<Vec<QueryRef<'_, Self>>>

Queries the value with a JSONPath expression and returns a vector of QueryResult.

Source

fn query_only_path(&self, path: &str) -> Queried<Vec<QueryPath>>

Queries the value with a JSONPath expression and returns a vector of values.

Source

fn query(&self, path: &str) -> Queried<Vec<&Self>>

Queries the value with a JSONPath expression and returns a vector of values, omitting the path.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl JsonPath for Value

Implementors§