Skip to main content

Module delegate

Module delegate 

Source
Expand description

Contains the trait delegate::DelegateRing that simplifies implementing the newtype-pattern for rings.

Structs§

DelegateFiniteRingElementsIter
Iterator over all elements of a finite DelegateRing.
UnwrapHom
Homomorphism from a DelegateRing to its delegate target. An element is mapped by using DelegateRing::delegate().
WrapHom
Homomorphism from a ring to a DelegateRing with the former ring as delegate target. An element is mapped by using DelegateRing::rev_delegate().

Traits§

DelegateRing
Trait to simplify implementing newtype-pattern for rings. When you want to create a ring that just wraps another ring, possibly adding some functionality, you can implement DelegateRing instead of RingBase, and just provide how to map elements in the new ring to the wrapped ring and vice versa.
DelegateRingImplEuclideanRing
Marks a DelegateRing R to be considered in the blanket implementation R: EuclideanRing where R::Base: EuclideanRing and R: PrincipalIdealRing where R::Base: PrincipalIdealRing.
DelegateRingImplFiniteRing
Marks a DelegateRing R to be considered in the blanket implementation R: FiniteRing where R::Base: FiniteRing.