pub struct ConfigRow {
pub key: &'static str,
pub category: &'static str,
pub help: &'static str,
pub plain: &'static str,
pub control: Control,
pub value: String,
pub original: String,
pub default: String,
pub recommended: Option<&'static str>,
pub is_new: bool,
}Expand description
One setting, as the view needs it.
Fields§
§key: &'static str§category: &'static strThe heading this row is drawn under. Rows sharing one are drawn together, in the order they arrive; the caller owns which group a setting is in.
help: &'static str§plain: &'static strThe same setting said again without jargon, shown under help rather than
instead of it. Someone who knows what a build tree is skips the second line;
someone who does not was going to guess, and guessing is how a setting gets
turned on for the wrong reason.
control: Control§value: StringThe value, spelled the way devp config set would take it.
original: StringWhat it was when the view opened, so the summary shows only real changes.
default: StringWhat a fresh install would hold, spelled the same way as value.
Not the same question as original, which is what this machine happens to hold.
Somebody looking at a setting they have never touched cannot tell those apart,
and the one they need in order to decide whether to touch it is this one.
recommended: Option<&'static str>The value the first-run screen suggests, if this setting is suggested at all.
A recommendation, never a requirement: everything here works with all of them declined. It is shown on every visit rather than only on the first run, because the screen that suggested it appears once and the settings list is forever.
is_new: boolIntroduced in a release newer than the one this machine last reviewed at.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConfigRow
impl RefUnwindSafe for ConfigRow
impl Send for ConfigRow
impl Sync for ConfigRow
impl Unpin for ConfigRow
impl UnsafeUnpin for ConfigRow
impl UnwindSafe for ConfigRow
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more