pub struct OptionItem {
pub id: String,
pub text: Vec<TextSegment>,
pub cond: Option<Arc<Expr>>,
pub once: bool,
pub tags: Vec<String>,
pub body: StmtList,
}Expand description
A single shortcut option.
Fields§
§id: StringStable id for once/saliency tracking.
text: Vec<TextSegment>Pre-parsed display text (literals and {expr} fragments).
cond: Option<Arc<Expr>>Optional guard (-> text <<if cond>>); None = always available if not once exhausted.
once: boolWhether this option is a once-option.
Trailing tags.
body: StmtListIndented body statements executed after selection.
Trait Implementations§
Source§impl Clone for OptionItem
impl Clone for OptionItem
Source§fn clone(&self) -> OptionItem
fn clone(&self) -> OptionItem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OptionItem
impl RefUnwindSafe for OptionItem
impl Send for OptionItem
impl Sync for OptionItem
impl Unpin for OptionItem
impl UnsafeUnpin for OptionItem
impl UnwindSafe for OptionItem
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