pub struct Manifest {
pub version: u32,
pub scopes: Vec<Scope>,
pub sections: Vec<Section>,
pub wizards: Vec<Wizard>,
pub quick: Vec<String>,
}Expand description
One owner’s contribution: scopes and sections, each section placed in
its scope. Versioned (FORMAT).
Fields§
§version: u32§scopes: Vec<Scope>§sections: Vec<Section>§wizards: Vec<Wizard>Multi-step flows (wizard).
quick: Vec<String>The settings offered in the quick settings (setting ids), in this order: the few a person changes often, without opening Settings.
Implementations§
Source§impl Manifest
impl Manifest
Sourcepub fn quick(self, ids: &[&str]) -> Manifest
pub fn quick(self, ids: &[&str]) -> Manifest
Marks settings quick (setting ids): offered in the quick settings, after those marked before.
Sourcepub fn wizard(self, wizard: Wizard) -> Manifest
pub fn wizard(self, wizard: Wizard) -> Manifest
A wizard (wizard): opened by admin.wizard.open or an action.
Sourcepub fn scope_at(self, id: &str, title: &str, icon: &str, order: i32) -> Manifest
pub fn scope_at(self, id: &str, title: &str, icon: &str, order: i32) -> Manifest
A scope placed among the others by order (the default scopes
are 0, 10, 20 and 110: generate::SCOPES).
Sourcepub fn section(
self,
path: &str,
title: &str,
build: impl FnOnce(&mut SectionBuilder<'_>),
) -> Manifest
pub fn section( self, path: &str, title: &str, build: impl FnOnce(&mut SectionBuilder<'_>), ) -> Manifest
A section at scope/section, filled by build.
pub fn to_json(&self) -> Value
Sourcepub fn bound_settings(&self) -> impl Iterator<Item = &str>
pub fn bound_settings(&self) -> impl Iterator<Item = &str>
The settings its fields bind, and those its widgets edit (their
options’ settings): the generated pages leave them out, so a
setting a manifest places shows once, where it is placed.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Manifest
impl<'de> Deserialize<'de> for Manifest
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Manifest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Manifest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Manifest
impl Serialize for Manifest
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Manifest
Auto Trait Implementations§
impl Freeze for Manifest
impl RefUnwindSafe for Manifest
impl Send for Manifest
impl Sync for Manifest
impl Unpin for Manifest
impl UnsafeUnpin for Manifest
impl UnwindSafe for Manifest
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>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<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>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> 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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§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