Trait Optic

Source
pub trait Optic<K: ArrayKind + Debug, O1, A1, O2, A2>
where K::Type<K::I>: NaturalArray<K>, K::Type<O1>: Array<K, O1> + Debug, K::Type<A1>: Array<K, A1> + Debug, K::Type<O2>: Array<K, O2> + Debug, K::Type<A2>: Array<K, A2> + Debug,
{ type F: SpiderFunctor<K, O1, A1, O2, A2>; type R: SpiderFunctor<K, O1, A1, O2, A2>; // Required method fn residual( ops: &Operations<K, O1, A1>, ) -> IndexedCoproduct<K, SemifiniteFunction<K, O2>>; // Provided methods fn map_object( a: &SemifiniteFunction<K, O1>, ) -> IndexedCoproduct<K, SemifiniteFunction<K, O2>> { ... } fn map_operations(ops: Operations<K, O1, A1>) -> OpenHypergraph<K, O2, A2> { ... } fn map_arrow(f: &OpenHypergraph<K, O1, A1>) -> OpenHypergraph<K, O2, A2> { ... } }
Expand description

An optic is composed of forward and reverse functors along with a residual object

Required Associated Types§

Source

type F: SpiderFunctor<K, O1, A1, O2, A2>

Source

type R: SpiderFunctor<K, O1, A1, O2, A2>

Required Methods§

Source

fn residual( ops: &Operations<K, O1, A1>, ) -> IndexedCoproduct<K, SemifiniteFunction<K, O2>>

Compute the residual object M for operations

Provided Methods§

Source

fn map_object( a: &SemifiniteFunction<K, O1>, ) -> IndexedCoproduct<K, SemifiniteFunction<K, O2>>

Source

fn map_operations(ops: Operations<K, O1, A1>) -> OpenHypergraph<K, O2, A2>

Source

fn map_arrow(f: &OpenHypergraph<K, O1, A1>) -> OpenHypergraph<K, 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§