FlagsList

Trait FlagsList 

Source
pub trait FlagsList<'a> {
    // Required methods
    fn new(tags: Tags<'a>, placeholder: &'a str) -> Self;
    fn add(&mut self, tags: Tags<'a>, placeholder: &'a str);
}
Expand description

Errors sometimes need to be able to refer to a group of flags, guaranteeing at least one. This trait allows the error type to express which container it wants to use.

Required Methods§

Source

fn new(tags: Tags<'a>, placeholder: &'a str) -> Self

Create a new FlagsList. Flags lists are guaranteed to include at least one flag, so this constructor includes that flag.

Source

fn add(&mut self, tags: Tags<'a>, placeholder: &'a str)

Insert an additional flag into this set.

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.

Implementations on Foreign Types§

Source§

impl<'a> FlagsList<'a> for Vec<(Tags<'a>, &'a str)>

Source§

fn new(tags: Tags<'a>, placeholder: &'a str) -> Self

Source§

fn add(&mut self, tags: Tags<'a>, placeholder: &'a str)

Implementors§

Source§

impl<'a> FlagsList<'a> for EmptyError

Source§

impl<'a> FlagsList<'a> for TagsList<'a>