pub struct Preferences { /* private fields */ }Implementations§
Source§impl Preferences
impl Preferences
pub fn table(columns: Vec<PreferenceColumn>, page_size: PageSize) -> Self
pub fn table_with_page_sizes( columns: Vec<PreferenceColumn>, page_size: PageSize, options: &[(PageSize, &'static str)], ) -> Self
pub fn columns_only(columns: Vec<PreferenceColumn>, header: bool) -> Self
pub fn with_page_sizes( self, current: Option<PageSize>, options: &[(PageSize, &'static str)], ) -> Self
pub fn radio_group( self, group: &'static str, title: &'static str, choices: &[(&'static str, &'static str)], selected: &str, ) -> Self
pub fn toggle( self, id: &'static str, title: &'static str, label: &'static str, enabled: bool, ) -> Self
Sourcepub fn read_only(self) -> Self
pub fn read_only(self) -> Self
Preserve a non-table tab’s fallback display without presenting working controls.
pub fn is_enabled(&self) -> bool
pub fn rows(&self) -> &[PreferenceRow]
pub fn max_index(&self) -> usize
pub fn columns(&self) -> impl Iterator<Item = &PreferenceColumn>
pub fn column_count(&self) -> usize
pub fn is_separator(&self, index: usize) -> bool
Sourcepub fn action(&self, index: usize) -> Option<PreferenceAction>
pub fn action(&self, index: usize) -> Option<PreferenceAction>
Headers, separators, locked columns, and stale indices have no action. Count only columns in this model, not stale IDs from a previous result set.
Sourcepub fn move_row(&self, index: usize, forward: bool) -> usize
pub fn move_row(&self, index: usize, forward: bool) -> usize
Up/down saturates at the ends and skips separators, including stale cursors.
Sourcepub fn move_section(&self, index: usize, forward: bool) -> usize
pub fn move_section(&self, index: usize, forward: bool) -> usize
Tab/BackTab cycles section headers, not individual options.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Preferences
impl RefUnwindSafe for Preferences
impl Send for Preferences
impl Sync for Preferences
impl Unpin for Preferences
impl UnsafeUnpin for Preferences
impl UnwindSafe for Preferences
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> 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 moreCreates a shared type from an unshared type.