[][src]Struct pl_lens::LensPath

pub struct LensPath {
    pub elements: Vec<LensPathElement>,
}

Describes a lens relative to a source data structure.

Fields

elements: Vec<LensPathElement>

The path elements.

Implementations

impl LensPath[src]

pub fn empty() -> LensPath[src]

Creates a new LensPath with no elements.

pub fn new(id: u64) -> LensPath[src]

Creates a new LensPath with a single element.

pub fn from_index(index: usize) -> LensPath[src]

Creates a new LensPath with a single index (for an indexed type such as Vec).

pub fn from_pair(id0: u64, id1: u64) -> LensPath[src]

Creates a new LensPath with two elements.

pub fn from_vec(ids: Vec<u64>) -> LensPath[src]

Creates a new LensPath from a vector of element identifiers.

pub fn concat(lhs: LensPath, rhs: LensPath) -> LensPath[src]

Creates a new LensPath that is the concatenation of the two paths.

Trait Implementations

impl Clone for LensPath[src]

impl Debug for LensPath[src]

impl Eq for LensPath[src]

impl Ord for LensPath[src]

impl PartialEq<LensPath> for LensPath[src]

impl PartialOrd<LensPath> for LensPath[src]

impl StructuralEq for LensPath[src]

impl StructuralPartialEq for LensPath[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.