pub trait HashableElRing: RingBase {
// Required method
fn hash<H: Hasher>(&self, el: &Self::Element, h: &mut H);
}Expand description
Trait for rings that can compute hashes for their elements.
This should be compatible with RingBase::eq_el in the usual way.
Required Methods§
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§
impl HashableElRing for MPZBase
Available on crate feature
mpir only.impl HashableElRing for feanor_math::rings::zn::zn_64::ZnBase
impl<A: Allocator + Clone> HashableElRing for RustBigintRingBase<A>
impl<C: RingStore, J: RingStore, A: Allocator + Clone> HashableElRing for feanor_math::rings::zn::zn_rns::ZnBase<C, J, A>where
C::Type: ZnRing + CanHomFrom<J::Type> + HashableElRing,
J::Type: IntegerRing,
<C::Type as ZnRing>::IntegerRingBase: IntegerRing + CanIsoFromTo<J::Type>,
impl<I: RingStore> HashableElRing for RationalFieldBase<I>
impl<I: RingStore> HashableElRing for feanor_math::rings::zn::zn_big::ZnBase<I>where
I::Type: IntegerRing,
impl<R> HashableElRing for FractionFieldImplBase<R>
We don’t have a canonical representation when the base ring is not an integer ring (even if it is a PID), since we can always multiply numerator/denominator by a unit.