Skip to main content

Clauses

Trait Clauses 

Source
pub trait Clauses: Sized {
    // Required method
    fn meta_mut(&mut self) -> &mut Meta;

    // Provided methods
    fn when(self, clause: &str) -> Self { ... }
    fn enabled(self, clause: &str, reason: &str) -> Self { ... }
}
Expand description

The when and enabled clauses, for every node’s builder.

Required Methods§

Source

fn meta_mut(&mut self) -> &mut Meta

Provided Methods§

Source

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

Shown only when the clause holds (the when language; the section’s values as form.<field id>).

Source

fn enabled(self, clause: &str, reason: &str) -> Self

Greyed, with its reason, when the clause does not hold.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§