pub struct ConfigSession<'a> {
pub declaration: Vec<DeclarationLine>,
pub standing: String,
pub rows: Vec<ConfigRow>,
pub suggestions: Vec<Suggestion>,
pub adapters: &'a [&'static str],
pub opt_in_adapters: &'a [&'static str],
pub groups: &'a [(&'static str, &'static [&'static str])],
pub validate: &'a dyn Fn(&str, &str) -> Result<(), String>,
pub title: &'a str,
}Expand description
Everything the view needs that it cannot work out for itself.
Fields§
§declaration: Vec<DeclarationLine>Shown above the settings; in practice the devp trust report.
standing: StringA one-line summary of what has and has not happened yet.
rows: Vec<ConfigRow>§suggestions: Vec<Suggestion>Settings worth turning on, shown once before the full list. Empty on every run but the first, which is the only time this screen appears at all.
adapters: &'a [&'static str]Every adapter name, in registry order, for the checklist.
opt_in_adapters: &'a [&'static str]Adapter names that need their own enable_* switch as well.
groups: &'a [(&'static str, &'static [&'static str])]The language groups the adapters are shown under, in display order. Anything not named by a group is collected under a trailing “Other”.
validate: &'a dyn Fn(&str, &str) -> Result<(), String>Round-trips one value through the setter that owns it. Err is shown in place
and the edit is refused, so validation lives in exactly one place.
title: &'a strTitle bar text — the walkthrough and config wizard arrive here differently.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ConfigSession<'a>
impl<'a> !Send for ConfigSession<'a>
impl<'a> !Sync for ConfigSession<'a>
impl<'a> !UnwindSafe for ConfigSession<'a>
impl<'a> Freeze for ConfigSession<'a>
impl<'a> Unpin for ConfigSession<'a>
impl<'a> UnsafeUnpin for ConfigSession<'a>
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> 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