Trait lifxi::http::prelude::Combine

source ·
pub trait Combine<T> {
    fn combine(self, other: T) -> Selectors;
}
Expand description

Enables chaining of non-randomized selectors.

Required Methods

Combines two selectors to begin a chain.

Examples
use lifxi::http::prelude::*;
let foo = Selector::Label("foo".to_string());
let bar = Selector::Label("bar".to_string());
let combined = foo.combine(bar);
assert_eq!(&format!("{}", combined), "label:foo,label:bar");
let foo = Selector::Label("foo".to_string());
let bar = Selector::Label("bar".to_string());
let baz = Selector::Label("baz".to_string());
let combined = foo.combine(bar).combine(baz);
assert_eq!(&format!("{}", combined), "label:foo,label:bar,label:baz");

Implementors