PlayerFeatureAdder

Trait PlayerFeatureAdder 

Source
pub trait PlayerFeatureAdder<F> {
    // Required methods
    fn get_column_headers(&self) -> &[&str];
    fn add_features(
        &self,
        player_id: &PlayerId,
        processor: &ReplayProcessor<'_>,
        frame: &Frame,
        frame_count: usize,
        current_time: f32,
        vector: &mut Vec<F>,
    ) -> SubtrActorResult<()>;

    // Provided method
    fn features_added(&self) -> usize { ... }
}
Expand description

This trait acts as an abstraction over a player-specific feature adder, and is primarily used to allow for heterogeneous collections of player feature adders in the NDArrayCollector. While it provides methods for adding player-specific features and retrieving column headers, it is generally recommended to implement the LengthCheckedPlayerFeatureAdder trait instead, which provides compile-time guarantees about the number of features returned.

Required Methods§

Source

fn get_column_headers(&self) -> &[&str]

Source

fn add_features( &self, player_id: &PlayerId, processor: &ReplayProcessor<'_>, frame: &Frame, frame_count: usize, current_time: f32, vector: &mut Vec<F>, ) -> SubtrActorResult<()>

Provided Methods§

Implementations on Foreign Types§

Source§

impl<G, F, const N: usize> PlayerFeatureAdder<F> for (G, &[&str; N])

Source§

fn add_features( &self, player_id: &PlayerId, processor: &ReplayProcessor<'_>, frame: &Frame, frame_count: usize, current_time: f32, vector: &mut Vec<F>, ) -> SubtrActorResult<()>

Source§

fn get_column_headers(&self) -> &[&str]

Implementors§