pub trait DynamicHasField {
type Inner;
// Required method
fn resolve_path<P: OwnedPathType>(p: P, name: &str) -> P;
}Available on crate feature
resolve-path only.Expand description
A trait to declare that a type has fields with dynamic names,
such as DirChildren, DirDescendants, etc.
This is used to resolve paths with resolve_path, particularly with the "name" and
${expr} syntaxes.
Required Associated Types§
Required Methods§
Sourcefn resolve_path<P: OwnedPathType>(p: P, name: &str) -> P
fn resolve_path<P: OwnedPathType>(p: P, name: &str) -> P
How to resolve the path for the field, from the path of Self, given the name
passed into the resolve_path! macro.
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.