pub struct SettingField {
pub id: &'static str,
pub name: &'static str,
pub section: &'static str,
pub display: DisplayFn,
pub dirty: DirtyFn,
pub adjust: AdjustFn,
pub apply_edit: ApplyEditFn,
pub ctrl_e_toggle: Option<CtrlEToggleFn>,
pub edit_kind: EditKind,
pub is_expert: bool,
pub is_ultra: bool,
}Fields§
§id: &'static str§name: &'static str§section: &'static str§display: DisplayFn§dirty: DirtyFn§adjust: AdjustFn§apply_edit: ApplyEditFn§ctrl_e_toggle: Option<CtrlEToggleFn>§edit_kind: EditKind§is_expert: bool§is_ultra: boolImplementations§
Source§impl SettingField
impl SettingField
pub fn name(&self) -> &str
pub fn display(&self, settings: &ModelSettings) -> String
pub fn is_dirty(&self, settings: &ModelSettings, cached: &ModelSettings) -> bool
pub fn adjust( &self, settings: &mut ModelSettings, delta: i32, context_limit: u32, )
pub fn apply_edit(&self, settings: &mut ModelSettings, buf: &str)
pub fn ctrl_e_toggle(&self, settings: &mut ModelSettings)
Sourcepub fn is_new_section(&self, prev_section: Option<&str>) -> bool
pub fn is_new_section(&self, prev_section: Option<&str>) -> bool
Returns true if this field starts a new section (different from the previous field’s section).
Auto Trait Implementations§
impl Freeze for SettingField
impl RefUnwindSafe for SettingField
impl Send for SettingField
impl Sync for SettingField
impl Unpin for SettingField
impl UnsafeUnpin for SettingField
impl UnwindSafe for SettingField
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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 more