[][src]Struct silkworm_features::Features

pub struct Features {
    pub pragmas: bool,
    pub unicode_identifiers: bool,
    pub scoped_nodes: bool,
    pub scoped_variables: bool,
    pub subroutine: bool,
    pub string_interpolation: bool,
    pub extended_escape: bool,
}

Structure containing all feature flags in the language.

Fields

pragmas: bool

Whether pragmas are allowed at all.

unicode_identifiers: boolscoped_nodes: boolscoped_variables: boolsubroutine: boolstring_interpolation: boolextended_escape: bool

Implementations

impl Features[src]

pub fn new() -> Self[src]

Returns a feature set with "default" silkworm extensions enabled. Same as Default::default.

pub fn basic() -> Self[src]

Returns a feature set with everything disabled except pragmas.

Features can still be turned on at the file level using feature pragmas.

pub fn compatible() -> Self[src]

Returns a feature set that is intended to be compatible with YarnSpinner 1.1.

This disables everything including pragmas. Features cannot be turned on at the file level.

pub fn all() -> Self[src]

Returns a feature set with everything enabled.

Trait Implementations

impl Clone for Features[src]

impl Debug for Features[src]

impl Default for Features[src]

impl Eq for Features[src]

impl Hash for Features[src]

impl PartialEq<Features> for Features[src]

impl StructuralEq for Features[src]

impl StructuralPartialEq for Features[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.