FacetInspect

Trait FacetInspect 

Source
pub trait FacetInspect<'a>: Facet<'a> {
    // Provided methods
    fn inspect(&'a self) -> FacetIterator<'a, 'a>  { ... }
    fn get(&'a self, path: &FacetPath) -> Option<Peek<'a, 'a>> { ... }
}

Provided Methods§

Source

fn inspect(&'a self) -> FacetIterator<'a, 'a>

Returns an iterator over the shape of the Facet object.

The iterator will yield tuples containing the path to the sub-object and its corresponding Peek.

Source

fn get(&'a self, path: &FacetPath) -> Option<Peek<'a, 'a>>

Returns a Peek for the sub-object at the specified path.

If the path does not lead to a valid sub-object, None is returned.

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.

Implementors§

Source§

impl<'a, T: Facet<'a>> FacetInspect<'a> for T