Skip to main content

Event

Trait Event 

Source
pub trait Event<const N: usize> {
    // Required method
    fn value(&self, time: f64, state: &[f64; N]) -> f64;

    // Provided method
    fn direction(&self) -> EventDirection { ... }
}
Expand description

A scalar zero-crossing condition for a fixed-size state.

Required Methods§

Source

fn value(&self, time: f64, state: &[f64; N]) -> f64

Evaluates the scalar event function.

Provided Methods§

Source

fn direction(&self) -> EventDirection

Crossing direction to detect.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§