pub struct Provider {
pub id: &'static str,
pub order: i32,
pub available: fn() -> bool,
pub group: fn() -> Group,
pub startup: Option<fn()>,
}Expand description
A settings group contributed by another crate (docs/settings.md): the self-updater’s
Updates group is the first. Declared as a static through provider!, which registers it
in the link-time slice on native targets; on wasm (no linkme) and anywhere an explicit
order matters, register_provider / Preferences::provider name it directly.
Fields§
§id: &'static strThe group’s route id; also used by Preferences::without_provider.
order: i32Sort key among the app’s groups (apps default to 0, providers to 500).
available: fn() -> boolWhether the group applies to this build/platform at all.
group: fn() -> GroupThe group.
startup: Option<fn()>Runs once inside Preferences::install, after the store is reachable: register menu
actions, start a scheduler, apply a persisted value.
Auto Trait Implementations§
impl Freeze for Provider
impl RefUnwindSafe for Provider
impl Send for Provider
impl Sync for Provider
impl Unpin for Provider
impl UnsafeUnpin for Provider
impl UnwindSafe for Provider
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