pub struct Dialect {
    pub enable_def: bool,
    pub enable_lambda: bool,
    pub enable_load: bool,
    pub enable_keyword_only_arguments: bool,
    pub enable_types: bool,
    pub enable_tabs: bool,
    pub enable_load_reexport: bool,
    pub enable_top_level_stmt: bool,
}
Expand description

Starlark language features to enable, e.g. Standard to follow the Starlark standard.

Fields

enable_def: bool

Are def statements permitted. Enabled in both Standard and Extended.

enable_lambda: bool

Are lambda expressions permitted. Enabled in both Standard and Extended.

enable_load: bool

Are load statements permitted. Enabled in both Standard and Extended.

enable_keyword_only_arguments: bool

Are * keyword-only arguments allowed as per PEP 3102. Only enabled in Extended.

enable_types: bool

Are expressions allowed in type positions as per PEP 484. Only enabled in Extended.

enable_tabs: bool

Are tabs permitted for indentation. If permitted, tabs are equivalent to 8 spaces. Enabled in both Standard and Extended.

enable_load_reexport: bool

Do load() statements reexport their definition. Enabled in both Standard and Extended, but may change in future definitions of the standard.

enable_top_level_stmt: bool

Are for, if and other statements allowed at the top level. Only enabled in Extended.

Implementations

Follow the Starlark language standard as much as possible.

A superset of Standard, including extra features (types, top-level statements etc).

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Get an ARef pointing at this type.

Try and get an ARef pointing at this type. Returns an Err if the type Self is a RefCell which is already mutably borrowed. Read more

Return the underlying RefCell if Self is one, otherwise None.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

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

Convert between two equal types.

Convert between references to two equal types.

Convert between mutable references to two equal types.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.