pub struct Suggestion {
pub key: &'static str,
pub label: &'static str,
pub help: &'static str,
pub plain: &'static str,
pub why: &'static str,
pub value: &'static str,
pub cautious: bool,
}Expand description
One entry on the first-run suggestions screen.
Only the first run gets this screen. Everything on it is also on the settings list two keystrokes later, so this is not the only way to reach any of it — it exists because a list of twenty-four settings, shown to somebody who has had this tool installed for nine seconds, is a list nobody reads.
Fields§
§key: &'static str§label: &'static strThree or four words naming what it turns on.
help: &'static strThe official one-liner — the setting’s own help.
plain: &'static strThe same thing without jargon.
why: &'static strWhy it is being suggested at all, which neither of the other two answers.
value: &'static strThe value accepting it sets.
cautious: boolThe second tier: worth turning on, with something specific to know first.
Kept apart rather than mixed in with a warning glyph, because “recommended” and “recommended once you know what it does” are different claims and one button must not be able to accept both at once.
Trait Implementations§
Source§impl Clone for Suggestion
impl Clone for Suggestion
Source§fn clone(&self) -> Suggestion
fn clone(&self) -> Suggestion
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for Suggestion
impl RefUnwindSafe for Suggestion
impl Send for Suggestion
impl Sync for Suggestion
impl Unpin for Suggestion
impl UnsafeUnpin for Suggestion
impl UnwindSafe for Suggestion
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