pub struct OnlineSetting {
pub on: bool,
pub answered: bool,
pub hosts: Vec<String>,
pub not_now: Vec<String>,
}Expand description
The “Online catalogs” switch of this machine, and the hosts it allows.
Fields§
§on: bool§answered: boolThe user answered once (on or off).
hosts: Vec<String>The approved hosts: those named when the user turned online
catalogs on or allowed since; LEGACY_HOSTS for an “on” answer
from before 0.9.0 (no list).
not_now: Vec<String>Hosts the user answered “Not now”: never contacted, not asked about
again (Settings > Catalogs or catalog online on allows them).
Implementations§
Source§impl OnlineSetting
impl OnlineSetting
Sourcepub fn allows(&self, host: &str) -> bool
pub fn allows(&self, host: &str) -> bool
Whether host may be contacted: online catalogs on, host approved.
Sourcepub fn unapproved(&self, contacts: &[String]) -> Vec<String>
pub fn unapproved(&self, contacts: &[String]) -> Vec<String>
The hosts of contacts (from contacts) not approved: catalogs
on them are not contacted.
Sourcepub fn to_ask(&self, contacts: &[String]) -> Vec<String>
pub fn to_ask(&self, contacts: &[String]) -> Vec<String>
The hosts to ask about: while on, the unapproved ones not answered “Not now” (skills.sh after an upgrade from before 0.9.0, a catalog added or turned on).
Trait Implementations§
Source§impl Clone for OnlineSetting
impl Clone for OnlineSetting
Source§impl Debug for OnlineSetting
impl Debug for OnlineSetting
impl Eq for OnlineSetting
Source§impl PartialEq for OnlineSetting
impl PartialEq for OnlineSetting
impl StructuralPartialEq for OnlineSetting
Auto Trait Implementations§
impl Forget for OnlineSetting
impl Freeze for OnlineSetting
impl Move for OnlineSetting
impl RefUnwindSafe for OnlineSetting
impl Send for OnlineSettingwhere
RawVecInner: Send,
impl Sync for OnlineSettingwhere
RawVecInner: Sync,
impl Unpin for OnlineSetting
impl UnsafeUnpin for OnlineSetting
impl UnwindSafe for OnlineSettingwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.