Skip to content

Commit

Permalink
Removed Event trait for core::Default
Browse files Browse the repository at this point in the history
  • Loading branch information
OscarFdezS committed Aug 1, 2024
1 parent 26f304a commit 5112d10
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions src/simulator/std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,51 +138,6 @@ impl<T: crate::traits::Bag> MultipleOutputHandler<T> {
}
}

/* pub trait Event {
type EventInfo;
fn default() -> Self;
} */

/// A trait for handling a generic event.
///
/// The trait is used to define the default behaviour that events must implement.
/// All events must implement this trait since there can be errors in the simulation and a default event must be returned.
///
/// # Examples
///
/// ```
/// pub struct AnyEvent {
/// pub some_type_of_data: (String, String),
/// }
///
/// impl Event for AnyEvent {
/// fn default() -> Self {
/// AnyEvent {
/// some_type_of_data: ("".to_string(), "".to_string()),
/// }
/// }
/// }
/// ```
pub trait Event {
/// Creates a default instance of the event.
///
/// # Examples
///
/// ```
/// struct MyEvent;
///
/// impl Event for MyEvent {
///
/// fn default() -> Self {
/// MyEvent
/// }
/// }
///
/// let event = MyEvent::default();
/// ```
fn default() -> Self;
}

/// A framework for adding Input Handlers and reducing the complexity of their use.
///
/// This struct manages input handlers by spawning threads for each handler and managing the communication
Expand Down

0 comments on commit 5112d10

Please sign in to comment.