Skip to main content

SectionBuilder

Struct SectionBuilder 

Source
pub struct SectionBuilder<'a> { /* private fields */ }
Expand description

A section being built (Manifest::section).

Implementations§

Source§

impl SectionBuilder<'_>

Source

pub fn group(&mut self, id: &str, title: &str) -> &mut Self

Opens a group (a heading and its rows); the items after it go in it.

Source

pub fn field(&mut self, field: Field) -> &mut Self

Source

pub fn action(&mut self, action: Action) -> &mut Self

Source

pub fn status(&mut self, status: Status) -> &mut Self

Source

pub fn callout(&mut self, callout: Callout) -> &mut Self

Source

pub fn widget(&mut self, id: &str, kind: &str, options: Json) -> &mut Self

Source

pub fn list(&mut self, records: Records) -> &mut Self

A record list.

Source

pub fn table(&mut self, records: Records) -> &mut Self

A record table.

Source

pub fn group_when(&mut self, clause: &str) -> &mut Self

The last group’s when clause.

Source

pub fn when(&mut self, clause: &str) -> &mut Self

The section’s when clause.

Source

pub fn description(&mut self, text: &str) -> &mut Self

Source

pub fn keywords(&mut self, words: &[&str]) -> &mut Self

Source

pub fn under(&mut self, parent: &str) -> &mut Self

Source

pub fn after(&mut self, anchor: &str) -> &mut Self

Places the section right after another of its scope (scope/section, or a section id of the same scope), from any manifest (Tree::merge).

Source

pub fn before(&mut self, anchor: &str) -> &mut Self

Places the section right before another of its scope.

Source

pub fn order(&mut self, order: i32) -> &mut Self

An explicit order: a weight sorted before the registration order, across manifests (0, the default, leaves the section where its manifest declares it). Prefer after.

Trait Implementations§

Source§

impl<'a> Debug for SectionBuilder<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for SectionBuilder<'a>

§

impl<'a> RefUnwindSafe for SectionBuilder<'a>

§

impl<'a> Send for SectionBuilder<'a>

§

impl<'a> Sync for SectionBuilder<'a>

§

impl<'a> Unpin for SectionBuilder<'a>

§

impl<'a> UnsafeUnpin for SectionBuilder<'a>

§

impl<'a> !UnwindSafe for SectionBuilder<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.