pub trait EventFunction<S: Scalar>: Send + Sync {
// Required method
fn evaluate(&self, t: S, y: &[S]) -> S;
// Provided methods
fn direction(&self) -> EventDirection { ... }
fn action(&self) -> EventAction { ... }
}Expand description
Trait for event functions.
An event function defines a scalar function g(t, y) whose zero-crossings are to be detected during integration.
Required Methods§
Provided Methods§
Sourcefn direction(&self) -> EventDirection
fn direction(&self) -> EventDirection
Direction of zero-crossing to detect.
Defaults to Both (detect crossings in either direction).
Sourcefn action(&self) -> EventAction
fn action(&self) -> EventAction
Action to take when event is detected.
Defaults to Continue (record and continue integration).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".