pub struct Declaration {
pub trigger: String,
pub replacement: String,
pub is_definition: bool,
pub is_constructor: bool,
pub is_macro: bool,
pub condition_prev: Option<String>,
pub condition_next: Option<String>,
}Expand description
Represents a code declaration with a trigger and replacement logic.
A declaration can be a constructor, macro, or definition, and it may also include conditions for matching.
Fields§
§trigger: StringThe string that triggers this declaration.
replacement: StringThe replacement string or code for this declaration.
is_definition: bool§is_constructor: bool§is_macro: bool§condition_prev: Option<String>§condition_next: Option<String>Implementations§
Source§impl Declaration
impl Declaration
Trait Implementations§
Source§impl Clone for Declaration
impl Clone for Declaration
Source§fn clone(&self) -> Declaration
fn clone(&self) -> Declaration
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 Declaration
impl RefUnwindSafe for Declaration
impl Send for Declaration
impl Sync for Declaration
impl Unpin for Declaration
impl UnwindSafe for Declaration
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