pub struct Tree {
pub scopes: Vec<Scope>,
pub sections: Vec<Section>,
pub wizards: Vec<Wizard>,
pub quick: Vec<String>,
/* private fields */
}Expand description
The resolved tree: every manifest merged, scopes and sections in order.
Fields§
§scopes: Vec<Scope>§sections: Vec<Section>§wizards: Vec<Wizard>§quick: Vec<String>The settings marked quick, each once, in their manifests’ order.
Implementations§
Source§impl Tree
impl Tree
Sourcepub fn merge(&mut self, m: Manifest)
pub fn merge(&mut self, m: Manifest)
Merges a manifest: its scopes after the ones there, its sections appended (a section at a path already there adds its groups to it), then every section placed again (docs/design/admin-forms.md, “Ordering”).
Sourcepub fn order_diagnostics(&self) -> &[Diagnostic]
pub fn order_diagnostics(&self) -> &[Diagnostic]
What the placement of the sections found ambiguous, as of the
last merge: admin-order-tie (two manifests give one scope’s
sections the same explicit order) and admin-unknown-anchor
(an after or before naming no section of the scope, or a
cycle). Read them once every manifest is merged: an anchor to a
later manifest’s section is unknown until then.
Sourcepub fn shown_scopes(&self) -> Vec<&Scope>
pub fn shown_scopes(&self) -> Vec<&Scope>
Scopes with at least one section.
Sourcepub fn sections_of(&self, scope: &str) -> Vec<&Section>
pub fn sections_of(&self, scope: &str) -> Vec<&Section>
A scope’s sections, in order.
pub fn section(&self, path: &str) -> Option<&Section>
pub fn wizard(&self, id: &str) -> Option<&Wizard>
Trait Implementations§
Source§impl Serialize for Tree
impl Serialize for Tree
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,
impl StructuralPartialEq for Tree
Auto Trait Implementations§
impl Freeze for Tree
impl RefUnwindSafe for Tree
impl Send for Tree
impl Sync for Tree
impl Unpin for Tree
impl UnsafeUnpin for Tree
impl UnwindSafe for Tree
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
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>
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>
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)
&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)
&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>
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>
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