pub struct Set { /* private fields */ }Expand description
Every host anybody has an opinion about, by name.
A map rather than a list because the question asked of it is always about one name, and because the order it iterates in is then the order the startup banner prints.
Implementations§
Source§impl Set
impl Set
Sourcepub fn new(configured: Vec<Host>) -> Self
pub fn new(configured: Vec<Host>) -> Self
The configured hosts, with any remembered changes of mind applied over them.
Sourcepub fn get(&self, name: &str) -> Option<&Host>
pub fn get(&self, name: &str) -> Option<&Host>
This host, if it is enabled.
Disabled reads the same as absent, which is what lets a caller treat “turned off” and “never mentioned” alike without writing the distinction down anywhere.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Set
impl RefUnwindSafe for Set
impl Send for Set
impl Sync for Set
impl Unpin for Set
impl UnsafeUnpin for Set
impl UnwindSafe for Set
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more