Skip to content

Commit

Permalink
feat: add activate and deactivate methods to Event
Browse files Browse the repository at this point in the history
  • Loading branch information
galenseilis committed Oct 9, 2024
1 parent 668ff31 commit af14bf8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions desru/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,16 @@ impl Event {
None
}
}

/// Sets the event to be active.
pub fn activate(&mut self) -> () {
self.active = true;
}

/// Sets the event to be inactive.
pub fn deactivate(&mut self) -> () {
self.active = false;
}
}

// Implement ordering traits for Event to use in BinaryHeap
Expand Down

0 comments on commit af14bf8

Please sign in to comment.