Skip to main content

ToNamesNotAll

Trait ToNamesNotAll 

Source
pub trait ToNamesNotAll: ToNames {
    // Provided methods
    fn iter_names_not_all(&self) -> impl Iterator<Item = &str> { ... }
    fn to_names_not_all(self) -> Spectrum<str> { ... }
}
Expand description

Same as ToNames but this marker ensures that no None will be returned by to_names.

Supporting trait: it is only there to make this crate’s API easier to use, it is implemented for everything that API accepts and is not one to implement anywhere else.

Provided Methods§

Source

fn iter_names_not_all(&self) -> impl Iterator<Item = &str>

Utility function to ensure no None could be returned for the names.

Source

fn to_names_not_all(self) -> Spectrum<str>

Utility function to ensure no None could be returned for the names.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl ToNamesNotAll for &[&str]

Source§

impl ToNamesNotAll for &str

Source§

impl ToNamesNotAll for (&str, &str)

Source§

impl ToNamesNotAll for (&str, &str, &str)

Source§

impl ToNamesNotAll for (&str, &str, &str, &str)

Source§

impl ToNamesNotAll for (&str, &str, &str, &str, &str)

Source§

impl ToNamesNotAll for (&str, &str, &str, &str, &str, &str)

Source§

impl ToNamesNotAll for (&str,)

Source§

impl ToNamesNotAll for ()

Source§

impl<const N: usize> ToNamesNotAll for [&str; N]

Implementors§