FieldReader

Trait FieldReader 

Source
pub trait FieldReader {
    // Required method
    fn read(&self, field: FieldId) -> Option<&[f32]>;
}
Expand description

Read-only access to field data within a simulation step.

Implemented by arena types to provide propagators with read access to field buffers. Returns None if the field is not readable in the current context.

Required Methods§

Source

fn read(&self, field: FieldId) -> Option<&[f32]>

Read the data for a field as a flat f32 slice.

Returns None if the field ID is invalid or not readable.

Implementors§