pub struct Environment {
pub do_not_track: Option<String>,
pub ci: Option<String>,
pub opted_out: bool,
}Expand description
The inputs decide reads: the two environment variables that matter
and the local opt-out. Built through Environment::from_vars so the
decision itself never touches std::env, and a test can hand it a map.
Fields§
§do_not_track: Option<String>DO_NOT_TRACK, if the variable is present at all.
ci: Option<String>CI, if the variable is present at all.
opted_out: boolWhether the person opted out on this machine.
Implementations§
Trait Implementations§
Source§impl Clone for Environment
impl Clone for Environment
Source§impl Debug for Environment
impl Debug for Environment
Source§impl Default for Environment
impl Default for Environment
impl Eq for Environment
Source§impl PartialEq for Environment
impl PartialEq for Environment
impl StructuralPartialEq for Environment
Auto Trait Implementations§
impl Freeze for Environment
impl RefUnwindSafe for Environment
impl Send for Environment
impl Sync for Environment
impl Unpin for Environment
impl UnsafeUnpin for Environment
impl UnwindSafe for Environment
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.