pub struct Identity;
Expand description
The identity functor, which implements Functor
for any signature.
Trait Implementations§
Source§impl<K: ArrayKind, O, A> Functor<K, O, A, O, A> for Identity
impl<K: ArrayKind, O, A> Functor<K, O, A, O, A> for Identity
Source§fn map_object(
&self,
a: &SemifiniteFunction<K, O>,
) -> IndexedCoproduct<K, SemifiniteFunction<K, O>>
fn map_object( &self, a: &SemifiniteFunction<K, O>, ) -> IndexedCoproduct<K, SemifiniteFunction<K, O>>
Action on objects
Source§fn map_arrow(&self, f: &OpenHypergraph<K, O, A>) -> OpenHypergraph<K, O, A>
fn map_arrow(&self, f: &OpenHypergraph<K, O, A>) -> OpenHypergraph<K, O, A>
Action on arrows.
If you have implemented
map_operations
, you can implement this simply as
define_map_arrow(self, f)
.Source§fn map_operations(&self, ops: Operations<K, O, A>) -> OpenHypergraph<K, O, A>
fn map_operations(&self, ops: Operations<K, O, A>) -> OpenHypergraph<K, O, A>
Action on tensoring of operations, i.e., compute
F(f₀) ● F(f₁) ● .. ● F(fn)
for
generators f_i
.Auto Trait Implementations§
impl Freeze for Identity
impl RefUnwindSafe for Identity
impl Send for Identity
impl Sync for Identity
impl Unpin for Identity
impl UnwindSafe for Identity
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more