pub struct EventEffectCommand {
pub event_indices: Vec<usize>,
pub effect: String,
pub operation: EffectOperation,
pub description: Option<String>,
}Expand description
Command to modify event effects
Fields§
§event_indices: Vec<usize>§effect: String§operation: EffectOperation§description: Option<String>Implementations§
Source§impl EventEffectCommand
impl EventEffectCommand
Sourcepub fn new(
event_indices: Vec<usize>,
effect: String,
operation: EffectOperation,
) -> Self
pub fn new( event_indices: Vec<usize>, effect: String, operation: EffectOperation, ) -> Self
Create a new effect command
Sourcepub fn set_effect(event_indices: Vec<usize>, effect: String) -> Self
pub fn set_effect(event_indices: Vec<usize>, effect: String) -> Self
Set effect for specific events
Sourcepub fn clear_effect(event_indices: Vec<usize>) -> Self
pub fn clear_effect(event_indices: Vec<usize>) -> Self
Clear effects for specific events
Sourcepub fn append_effect(event_indices: Vec<usize>, effect: String) -> Self
pub fn append_effect(event_indices: Vec<usize>, effect: String) -> Self
Append effect to specific events
Sourcepub fn with_description(self, description: String) -> Self
pub fn with_description(self, description: String) -> Self
Set a custom description for this command
Trait Implementations§
Source§impl Clone for EventEffectCommand
impl Clone for EventEffectCommand
Source§fn clone(&self) -> EventEffectCommand
fn clone(&self) -> EventEffectCommand
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 EventEffectCommand
impl Debug for EventEffectCommand
Source§impl EditorCommand for EventEffectCommand
impl EditorCommand for EventEffectCommand
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 EventEffectCommand
impl RefUnwindSafe for EventEffectCommand
impl Send for EventEffectCommand
impl Sync for EventEffectCommand
impl Unpin for EventEffectCommand
impl UnwindSafe for EventEffectCommand
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