Skip to main content

CropExtensionHandler

Trait CropExtensionHandler 

Source
pub trait CropExtensionHandler {
    // Required method
    fn transform_for_crop(
        &mut self,
        scope: ExtensionScope,
        sample_start: Option<u64>,
        sample_count: Option<u64>,
        crop_start: u64,
        crop_count: u64,
        fields: &mut Map<String, Value>,
    ) -> Result<(), SigmfError>;
}
Expand description

Transforms application-defined fields while a recording is cropped.

Required Methods§

Source

fn transform_for_crop( &mut self, scope: ExtensionScope, sample_start: Option<u64>, sample_count: Option<u64>, crop_start: u64, crop_count: u64, fields: &mut Map<String, Value>, ) -> Result<(), SigmfError>

Receives each field map that contains extension data.

sample_start and sample_count refer to the unmodified capture or annotation; both are None for global extension fields. The crop interval uses absolute, half-open sample indices.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§