IqPath

Trait IqPath 

Source
pub trait IqPath {
    // Required method
    fn keys(&self) -> impl Iterator<Item = &str>;

    // Provided method
    fn iq_path(&self) -> Vec<String> { ... }
}
Expand description

A path defining a deep destination into a value.

Searching with an empty path will always return None.

Required Methods§

Source

fn keys(&self) -> impl Iterator<Item = &str>

Provided Methods§

Source

fn iq_path(&self) -> Vec<String>

Build from any implementation of the trait a canonical parsed version which is a little faster to use (for when you need to use the same iq_path multiple times).

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 IqPath for &str

Source§

fn keys(&self) -> impl Iterator<Item = &str>

Source§

impl IqPath for &Vec<&str>

Source§

fn keys(&self) -> impl Iterator<Item = &str>

Source§

impl IqPath for &Vec<String>

Source§

fn keys(&self) -> impl Iterator<Item = &str>

Source§

impl IqPath for &[&str]

Source§

fn keys(&self) -> impl Iterator<Item = &str>

Source§

impl IqPath for &[String]

Source§

fn keys(&self) -> impl Iterator<Item = &str>

Source§

impl IqPath for Vec<&str>

Source§

fn keys(&self) -> impl Iterator<Item = &str>

Source§

impl<const N: usize> IqPath for &[&str; N]

Source§

fn keys(&self) -> impl Iterator<Item = &str>

Implementors§