pub struct Preferences { /* private fields */ }Expand description
The settings declaration (docs/settings.md). Build it in root() and call
Self::install.
Implementations§
Source§impl Preferences
impl Preferences
pub fn new() -> Self
Sourcepub fn about(self, about: About) -> Self
pub fn about(self, about: About) -> Self
The About content; registers the About menu item and window.
Sourcepub fn providers(self, policy: Providers) -> Self
pub fn providers(self, policy: Providers) -> Self
Which registered providers to collect (default: all available).
Sourcepub fn provider(self, p: &'static Provider) -> Self
pub fn provider(self, p: &'static Provider) -> Self
Name a provider explicitly (also what a wasm build does, where the link-time slice is empty).
Sourcepub fn without_provider(self, id: &'static str) -> Self
pub fn without_provider(self, id: &'static str) -> Self
Leave out a registered provider by id.
Sourcepub fn presentation(self, p: Presentation) -> Self
pub fn presentation(self, p: Presentation) -> Self
Pin the presentation instead of letting the toolkit decide.
Sourcepub fn window_size(self, width: f64, height: f64) -> Self
pub fn window_size(self, width: f64, height: f64) -> Self
The desktop window’s size (height is a ceiling: the window fits its page).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Preferences
impl !Send for Preferences
impl !Sync for Preferences
impl !UnwindSafe for Preferences
impl Freeze for Preferences
impl Unpin for Preferences
impl UnsafeUnpin 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<T> ErasedDestructor for Twhere
T: 'static,
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