pub struct MetaPath { /* private fields */ }Expand description
A parsed dot-separated path for navigating nested syn metadata.
Construct via FromStr or MetaPath::parse.
§Examples
ⓘ
use zyn::path::MetaPath;
// Simple dotted path
let path: MetaPath = "serde.rename".parse().unwrap();
assert_eq!(path.len(), 2);
// With index access
let path: MetaPath = "derive[0]".parse().unwrap();
assert_eq!(path.len(), 2);
assert_eq!(path.to_string(), "derive[0]");Implementations§
Trait Implementations§
impl Eq for MetaPath
impl StructuralPartialEq for MetaPath
Auto Trait Implementations§
impl Freeze for MetaPath
impl RefUnwindSafe for MetaPath
impl Send for MetaPath
impl Sync for MetaPath
impl Unpin for MetaPath
impl UnsafeUnpin for MetaPath
impl UnwindSafe for MetaPath
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