pub struct ApplyStyleCommand {
pub old_style: String,
pub new_style: String,
pub event_filter: Option<String>,
pub description: Option<String>,
}Expand description
Command to apply a style to events (change all events using one style to another)
Fields§
§old_style: String§new_style: String§event_filter: Option<String>§description: Option<String>Implementations§
Source§impl ApplyStyleCommand
impl ApplyStyleCommand
Sourcepub fn new(old_style: String, new_style: String) -> Self
pub fn new(old_style: String, new_style: String) -> Self
Create a new style application command
Sourcepub fn with_filter(self, filter: String) -> Self
pub fn with_filter(self, filter: String) -> Self
Only apply to events containing specific text
Sourcepub fn with_description(self, description: String) -> Self
pub fn with_description(self, description: String) -> Self
Set custom description
Trait Implementations§
Source§impl Clone for ApplyStyleCommand
impl Clone for ApplyStyleCommand
Source§fn clone(&self) -> ApplyStyleCommand
fn clone(&self) -> ApplyStyleCommand
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 moreSource§impl Debug for ApplyStyleCommand
impl Debug for ApplyStyleCommand
Source§impl EditorCommand for ApplyStyleCommand
impl EditorCommand for ApplyStyleCommand
Source§fn execute(&self, document: &mut EditorDocument) -> Result<CommandResult>
fn execute(&self, document: &mut EditorDocument) -> Result<CommandResult>
Execute the command on the given document Read more
Source§fn description(&self) -> &str
fn description(&self) -> &str
Get a human-readable description of the command
Source§fn memory_usage(&self) -> usize
fn memory_usage(&self) -> usize
Get the estimated memory usage of this command Read more
Source§fn modifies_content(&self) -> bool
fn modifies_content(&self) -> bool
Check if this command modifies document content Read more
Auto Trait Implementations§
impl Freeze for ApplyStyleCommand
impl RefUnwindSafe for ApplyStyleCommand
impl Send for ApplyStyleCommand
impl Sync for ApplyStyleCommand
impl Unpin for ApplyStyleCommand
impl UnwindSafe for ApplyStyleCommand
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