Struct starlark_syntax::dialect::Dialect
source · pub struct Dialect {
pub enable_def: bool,
pub enable_lambda: bool,
pub enable_load: bool,
pub enable_keyword_only_arguments: bool,
pub enable_types: DialectTypes,
pub enable_load_reexport: bool,
pub enable_top_level_stmt: bool,
pub enable_f_strings: bool,
pub _non_exhaustive: (),
}
Expand description
Starlark language features to enable, e.g. Standard
to follow the Starlark standard.
Fields§
§enable_def: bool
§enable_lambda: bool
§enable_load: bool
§enable_keyword_only_arguments: bool
§enable_types: DialectTypes
§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
.
enable_f_strings: bool
Are f"{expression}"
strings supported?
Disabled in all dialects by default.
_non_exhaustive: ()
Like #[non_exhaustive]
, but allows struct expression.
Implementations§
source§impl Dialect
impl Dialect
sourcepub const Standard: Self = _
pub const Standard: Self = _
Follow the Starlark language standard as much as possible.
This is also returned by Dialect::default()
.
Trait Implementations§
source§impl PartialEq for Dialect
impl PartialEq for Dialect
impl Eq for Dialect
impl StructuralPartialEq for Dialect
Auto Trait Implementations§
impl RefUnwindSafe for Dialect
impl Send for Dialect
impl Sync for Dialect
impl Unpin for Dialect
impl UnwindSafe for Dialect
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.