Struct pact_models::path_exp::DocPath [−][src]
pub struct DocPath { /* fields omitted */ }
Implementations
Infallible construction for when the expression is statically known, intended for unit tests.
Invalid expressions will still cause panics.
Construct a new DocPath with an empty expression.
Warning: do not call any of the push_*
methods on this DocPath,
as that would create an expression with invalid syntax
(because it would be missing the Root token).
Extract the string contents of the first Field token. For use with Header and Query DocPaths.
Calculates the path weight for this path expression and a given path. Returns a tuple of the calculated weight and the number of path tokens matched.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for DocPath
impl UnwindSafe for DocPath
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more