Skip to main content

HashableElRing

Trait HashableElRing 

Source
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§

Source

fn hash<H: Hasher>(&self, el: &Self::Element, h: &mut H)

Hashes the given ring element.

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§

Source§

impl HashableElRing for MPZBase

Available on crate feature mpir only.
Source§

impl HashableElRing for feanor_math::rings::zn::zn_64::ZnBase

Source§

impl<A: Allocator + Clone> HashableElRing for RustBigintRingBase<A>

Source§

impl<C: RingStore, J: RingStore, A: Allocator + Clone> HashableElRing for feanor_math::rings::zn::zn_rns::ZnBase<C, J, A>

Source§

impl<I: RingStore> HashableElRing for RationalFieldBase<I>

Source§

impl<I: RingStore> HashableElRing for feanor_math::rings::zn::zn_big::ZnBase<I>
where I::Type: IntegerRing,

Source§

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.

Source§

impl<R, A: Allocator + Clone, C: ConvolutionAlgorithm<R::Type>> HashableElRing for DensePolyRingBase<R, A, C>

Source§

impl<R, V, A, C> HashableElRing for FreeAlgebraImplBase<R, V, A, C>

Source§

impl<R: DelegateRing + ?Sized> HashableElRing for R
where R::Base: HashableElRing,

Source§

impl<R: RingStore, const N: usize> HashableElRing for DirectPowerRingBase<R, N>
where R::Type: HashableElRing,

Source§

impl<T: PrimitiveInt> HashableElRing for StaticRingBase<T>

Source§

impl<const N: u64, const IS_FIELD: bool> HashableElRing for feanor_math::rings::zn::zn_static::ZnBase<N, IS_FIELD>