Singleton

Trait Singleton 

Source
pub trait Singleton<T> {
    // Required method
    fn singleton(x: T) -> Self;
}
Expand description

Create a representation of a singleton sets from the given value.

Separated into a trait to allow conditional compilation depending on the presence of the singleton feature.

https://en.wikipedia.org/wiki/Singleton_set

Required Methods§

Source

fn singleton(x: T) -> Self

Create a singleton set containing only the given value.

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<T> Singleton<T> for Interval<T>
where T: Clone,

Available on non-crate feature singleton only.