Skip to main content

SetSignature

Trait SetSignature 

Source
pub trait SetSignature: Signature {
    type Set: Clone + Debug + Send + Sync;

    // Required method
    fn validate_element(&self, x: &Self::Set) -> Result<(), String>;

    // Provided method
    fn is_element(&self, x: &Self::Set) -> bool { ... }
}
Expand description

Instances of a type implementing this trait represent a set of elements of type Self::Set with some structure, for example, the structure of a ring.

Required Associated Types§

Required Methods§

Source

fn validate_element(&self, x: &Self::Set) -> Result<(), String>

Some instances of Self::Set may not be valid to represent elements of this set. Return Ok(()) if x is a valid element and an Err explaining why if not.

Provided Methods§

Source

fn is_element(&self, x: &Self::Set) -> bool

Some instances of Self::Set may not be valid to represent elements of this set. Return true if x is a valid element and an false if not.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§