[][src]Struct libslide::common::ProgramContext

pub struct ProgramContext {
    pub(crate) rule_denylist: Vec<RuleName>,
    pub(crate) always_flatten: bool,
    pub(crate) lint: bool,
}

A context for evaluating a slide program.

Fields

rule_denylist: Vec<RuleName>

Rules that should not be included in the evaluation of an expression.

always_flatten: bool

Whether an expression should always be flattened before it is further evaluated.

lint: bool

Whether "lint"-like diagnostics should be emitted.

Implementations

impl ProgramContext[src]

pub fn with_denylist<T>(self, rule_denylist: T) -> Self where
    T: Into<Vec<RuleName>>, 
[src]

Set rules to exclude in evaluation.

pub fn always_flatten(self, flatten: bool) -> Self[src]

Whether expressions should always be flattened during evaluation.

pub fn lint(self, lint: bool) -> Self[src]

Sets whether "lint"-like diagnostics should be emitted.

Trait Implementations

impl Default for ProgramContext[src]

Auto Trait Implementations

impl RefUnwindSafe for ProgramContext

impl Send for ProgramContext

impl Sync for ProgramContext

impl Unpin for ProgramContext

impl UnwindSafe for ProgramContext

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.