pub struct Settings {Show 36 fields
pub selected_library: usize,
pub keyboard_layout: String,
pub frontlight: bool,
pub wifi: bool,
pub inverted: bool,
pub sleep_cover: bool,
pub auto_share: bool,
pub auto_time: bool,
pub auto_frontlight: bool,
pub auto_frontlight_night_brightness: Option<LightLevel>,
pub auto_frontlight_manual_coordinates: Option<Coordinates>,
pub auto_frontlight_last_coordinates: Option<Coordinates>,
pub rotation_lock: Option<RotationLock>,
pub button_scheme: ButtonScheme,
pub auto_suspend: f32,
pub auto_power_off: f32,
pub time_format: String,
pub date_format: String,
pub external_urls_queue: Option<PathBuf>,
pub libraries: Vec<LibrarySettings>,
pub intermissions: Intermissions,
pub frontlight_presets: Vec<LightPreset>,
pub home: HomeSettings,
pub reader: ReaderSettings,
pub import: ImportSettings,
pub dictionary: DictionarySettings,
pub sketch: SketchSettings,
pub calculator: CalculatorSettings,
pub battery: BatterySettings,
pub frontlight_levels: LightLevels,
pub ota: OtaSettings,
pub logging: LoggingSettings,
pub settings_retention: usize,
pub db_backup_retention: usize,
pub startup_mode: StartupMode,
pub locale: Option<LanguageIdentifier>,
}Fields§
§selected_library: usize§keyboard_layout: String§frontlight: bool§wifi: bool§inverted: bool§sleep_cover: bool§auto_time: bool§auto_frontlight: boolWhether frontlight levels should be managed automatically.
When enabled, Cadmus derives brightness and warmth from the current time and a known location.
auto_frontlight_night_brightness: Option<LightLevel>The brightness to use after sunset and before sunrise when automatic frontlight control is enabled.
auto_frontlight_manual_coordinates: Option<Coordinates>A user-specified location for automatic frontlight calculations.
When present, this takes precedence over coordinates discovered from automatic time syncing.
auto_frontlight_last_coordinates: Option<Coordinates>The last automatically discovered location for automatic frontlight calculations.
This is typically refreshed during automatic time synchronization and is used only when no manual coordinates are configured.
rotation_lock: Option<RotationLock>§auto_suspend: f32§auto_power_off: f32§time_format: String§date_format: String§external_urls_queue: Option<PathBuf>§libraries: Vec<LibrarySettings>§intermissions: Intermissions§frontlight_presets: Vec<LightPreset>§home: HomeSettings§reader: ReaderSettings§import: ImportSettings§dictionary: DictionarySettings§sketch: SketchSettings§calculator: CalculatorSettings§battery: BatterySettings§frontlight_levels: LightLevels§ota: OtaSettings§logging: LoggingSettings§settings_retention: usize§db_backup_retention: usize§startup_mode: StartupMode§locale: Option<LanguageIdentifier>Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Settings
impl<'de> Deserialize<'de> for Settings
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnsafeUnpin for Settings
impl UnwindSafe for Settings
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.