pub trait FromModulusCreateableZnRing: Sized + ZnRing {
// Required method
fn from_modulus<F, E>(create_modulus: F) -> Result<Self, E>
where F: FnOnce(&Self::IntegerRingBase) -> Result<El<Self::IntegerRing>, E>;
}Available on crate feature
unstable-enable only.Expand description
Trait for implementations of ZnRing that can be created (possibly with a
default configuration) from just the integer modulus.
I am not yet sure whether to use this trait, or opt for a factory trait (which would then offer more flexibility).
§Availability
This API is marked as unstable and is only available when the unstable-enable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.
Required Methods§
fn from_modulus<F, E>(create_modulus: F) -> Result<Self, E>
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.