Skip to main content

TimeSampleMap

Type Alias TimeSampleMap 

Source
pub type TimeSampleMap = Vec<(f64, Value)>;
Expand description

A time-sample map: (time, value) pairs sorted ascending by compare_sample_times with one entry per time, the order C++ SdfTimeSampleMap (a std::map) keeps. The readers establish it through normalize_time_samples as they decode a layer and AttributeSpecMut::set_time_sample keeps it, so value resolution and interpolation can binary-search a map. A raw field write (Spec::set, a replayed diff) must supply an ordered map.

Aliased Type§

pub struct TimeSampleMap { /* private fields */ }

Trait Implementations§

Source§

impl TryFrom<Value> for TimeSampleMap

Source§

type Error = CastError

The type returned in the event of a conversion error.
Source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.