Skip to main content

EventLookup

Trait EventLookup 

Source
pub trait EventLookup {
    // Required method
    fn scalar(&self, name: &str) -> Option<f64>;

    // Provided method
    fn p4_component(&self, name: &str, component: P4Component) -> Option<f64> { ... }
}
Expand description

Supplies event-dependent scalar values for direct CPU evaluation.

Required Methods§

Source

fn scalar(&self, name: &str) -> Option<f64>

Returns the scalar named name, or None when it is unavailable.

Provided Methods§

Source

fn p4_component(&self, name: &str, component: P4Component) -> Option<f64>

Returns one component of a named four-momentum.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl EventLookup for HashMap<String, f64>

Source§

fn scalar(&self, name: &str) -> Option<f64>

Implementors§

Source§

impl<F> EventLookup for F
where F: for<'a> Fn(&'a str) -> Option<f64>,