pub struct Checklist { /* private fields */ }Expand description
A checklist, as a screen describes it.
Implementations§
Source§impl Checklist
impl Checklist
Sourcepub fn new(label: impl Into<String>) -> Self
pub fn new(label: impl Into<String>) -> Self
An empty checklist. label names it to a screen reader.
Sourcepub fn id(self, id: impl Into<String>) -> Self
pub fn id(self, id: impl Into<String>) -> Self
The element id of the list, for a link or a label to point at.
Sourcepub fn group(self, label: impl Into<String>, entries: Vec<Entry>) -> Self
pub fn group(self, label: impl Into<String>, entries: Vec<Entry>) -> Self
Adds a group at the top level.
Sourcepub fn select_all(self, offer: Offer) -> Self
pub fn select_all(self, offer: Offer) -> Self
Select all and select none. Default: past SELECT_ALL_PAST choices.
Sourcepub fn search(self, offer: Offer) -> Self
pub fn search(self, offer: Offer) -> Self
The search box. Default: past SEARCH_PAST choices.
Sourcepub fn expand(self, expand: Expand) -> Self
pub fn expand(self, expand: Expand) -> Self
Which groups start open. Default: Expand::Auto.
Sourcepub fn read_only(self, read_only: bool) -> Self
pub fn read_only(self, read_only: bool) -> Self
Shows the list without letting it change: every box is locked and select all is withheld.
Sourcepub fn view(&self, i18n: &Translator) -> ChecklistView
pub fn view(&self, i18n: &Translator) -> ChecklistView
Resolves the list for rendering: every decision made, every string in the reader’s language. Serialisable, so a field type carries it in its view-model and an override presents the same list.
Sourcepub fn render(&self, i18n: &Translator) -> Markup
pub fn render(&self, i18n: &Translator) -> Markup
The checklist as markup.
Trait Implementations§
impl Eq for Checklist
impl StructuralPartialEq for Checklist
Auto Trait Implementations§
impl Freeze for Checklist
impl RefUnwindSafe for Checklist
impl Send for Checklist
impl Sync for Checklist
impl Unpin for Checklist
impl UnsafeUnpin for Checklist
impl UnwindSafe for Checklist
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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