pub struct FlagSetConstructor {
pub flags: Vec<(&'static str, Flag)>,
}
Expand description
A helper struct for constructing a flag set.
Fields§
§flags: Vec<(&'static str, Flag)>
Implementations§
Source§impl FlagSetConstructor
impl FlagSetConstructor
Sourcepub fn add_ident_def(self, name: &'static str, default: impl ToString) -> Self
pub fn add_ident_def(self, name: &'static str, default: impl ToString) -> Self
Add a string flag with a default
Sourcepub fn add_bool_def(self, name: &'static str, default: bool) -> Self
pub fn add_bool_def(self, name: &'static str, default: bool) -> Self
Add a boolean flag with a default
Sourcepub fn add_set(self, name: &'static str, set: FlagSetConstructor) -> Self
pub fn add_set(self, name: &'static str, set: FlagSetConstructor) -> Self
Add a nested flag set
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FlagSetConstructor
impl RefUnwindSafe for FlagSetConstructor
impl Send for FlagSetConstructor
impl Sync for FlagSetConstructor
impl Unpin for FlagSetConstructor
impl UnwindSafe for FlagSetConstructor
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
Source§impl<T> Convert for T
impl<T> Convert for T
Source§fn convert<U>(self, context: &CompileContext) -> Expr<U>where
U: ConvertFrom<T>,
fn convert<U>(self, context: &CompileContext) -> Expr<U>where
U: ConvertFrom<T>,
Convert
self
into a specific type. Read moreSource§fn can_convert<U>(&self) -> boolwhere
U: ConvertFrom<T>,
fn can_convert<U>(&self) -> boolwhere
U: ConvertFrom<T>,
Check if
self
can be converted into a specific type. Read more