Optic

Trait Optic 

Source
pub trait Optic<O1: Clone + PartialEq, A1: Clone, O2: Clone + PartialEq + Debug, A2: Clone>: Clone + 'static {
    // Required methods
    fn fwd_object(&self, o: &O1) -> Vec<O2>;
    fn fwd_operation(
        &self,
        a: &A1,
        source: &[O1],
        target: &[O1],
    ) -> OpenHypergraph<O2, A2>;
    fn rev_object(&self, o: &O1) -> Vec<O2>;
    fn rev_operation(
        &self,
        a: &A1,
        source: &[O1],
        target: &[O1],
    ) -> OpenHypergraph<O2, A2>;
    fn residual(&self, a: &A1) -> Vec<O2>;

    // Provided methods
    fn map_arrow(&self, term: OpenHypergraph<O1, A1>) -> OpenHypergraph<O2, A2> { ... }
    fn map_adapted(
        &self,
        term: OpenHypergraph<O1, A1>,
    ) -> OpenHypergraph<O2, A2> { ... }
}
Expand description

§

foo

Required Methods§

Source

fn fwd_object(&self, o: &O1) -> Vec<O2>

Source

fn fwd_operation( &self, a: &A1, source: &[O1], target: &[O1], ) -> OpenHypergraph<O2, A2>

Source

fn rev_object(&self, o: &O1) -> Vec<O2>

Source

fn rev_operation( &self, a: &A1, source: &[O1], target: &[O1], ) -> OpenHypergraph<O2, A2>

Source

fn residual(&self, a: &A1) -> Vec<O2>

Provided Methods§

Source

fn map_arrow(&self, term: OpenHypergraph<O1, A1>) -> OpenHypergraph<O2, A2>

Source

fn map_adapted(&self, term: OpenHypergraph<O1, A1>) -> OpenHypergraph<O2, A2>

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§