pub struct ToggleSetting {
pub key: Cow<'static, str>,
pub title: Cow<'static, str>,
pub notification: Option<Cow<'static, str>>,
pub requires: Option<Cow<'static, str>>,
pub requires_false: Option<Cow<'static, str>>,
pub refreshes: Option<Vec<Cow<'static, str>>>,
pub subtitle: Option<Cow<'static, str>>,
pub auth_to_disable: Option<bool>,
pub default: bool,
}Expand description
Fields§
§key: Cow<'static, str>The unique key that identifies this setting.
title: Cow<'static, str>The display title for this setting.
notification: Option<Cow<'static, str>>Optional notification to send to the source when this setting is changed.
requires: Option<Cow<'static, str>>Optional key of another setting that must be enabled for this setting to be enabled.
requires_false: Option<Cow<'static, str>>Optional key of another setting that must be disabled for this setting to be enabled.
refreshes: Option<Vec<Cow<'static, str>>>Optional list of items that should be refreshed when this setting changes.
The valid options are:
contentlistingssettings
subtitle: Option<Cow<'static, str>>Optional subtitle text.
auth_to_disable: Option<bool>Whether to require authentication to turn the toggle off.
default: boolThe default state of the toggle.
Trait Implementations§
Source§impl Clone for ToggleSetting
impl Clone for ToggleSetting
Source§fn clone(&self) -> ToggleSetting
fn clone(&self) -> ToggleSetting
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ToggleSetting
impl Debug for ToggleSetting
Source§impl Default for ToggleSetting
impl Default for ToggleSetting
Source§impl From<ToggleSetting> for Setting
impl From<ToggleSetting> for Setting
Source§fn from(source: ToggleSetting) -> Self
fn from(source: ToggleSetting) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ToggleSetting
impl PartialEq for ToggleSetting
impl StructuralPartialEq for ToggleSetting
Auto Trait Implementations§
impl Freeze for ToggleSetting
impl RefUnwindSafe for ToggleSetting
impl Send for ToggleSetting
impl Sync for ToggleSetting
impl Unpin for ToggleSetting
impl UnwindSafe for ToggleSetting
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