pub trait Divisors: Sized {
// Required method
fn divisors_unordered(&self) -> Vec<Self>;
// Provided method
fn divisors(&self) -> Vec<Self>
where Self: Ord { ... }
}Expand description
Trait for getting all positive divisors of an integer.
Required Methods§
Sourcefn divisors_unordered(&self) -> Vec<Self>
fn divisors_unordered(&self) -> Vec<Self>
Returns the list of divisors of self in no particular order.
Provided 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.