pub enum ContactTransformOperationV1 {
Trim {
version: u32,
interval: ContactTransformIntervalV1,
},
Slice {
version: u32,
interval: ContactTransformIntervalV1,
},
Resample {
version: u32,
mapping: String,
},
TimeWarp {
version: u32,
output_duration_s: f64,
control_points: Vec<ContactTimeWarpControlPointV1>,
},
}Expand description
The closed V1 contact operation vocabulary.
Variants§
Trim
Retain and normalize one interval.
Fields
§
interval: ContactTransformIntervalV1Retained normalized interval.
Slice
Retain and normalize one interval with slice semantics.
Fields
§
interval: ContactTransformIntervalV1Retained normalized interval.
Resample
Identity normalized-time mapping.
TimeWarp
Strictly monotone piecewise-linear source-to-output mapping.
Implementations§
Source§impl ContactTransformOperationV1
impl ContactTransformOperationV1
Sourcepub const fn trim(interval: ContactTransformIntervalV1) -> Self
pub const fn trim(interval: ContactTransformIntervalV1) -> Self
Construct a V1 trim request.
Sourcepub const fn slice(interval: ContactTransformIntervalV1) -> Self
pub const fn slice(interval: ContactTransformIntervalV1) -> Self
Construct a V1 slice request.
Sourcepub fn time_warp(
output_duration_s: f64,
control_points: Vec<ContactTimeWarpControlPointV1>,
) -> Self
pub fn time_warp( output_duration_s: f64, control_points: Vec<ContactTimeWarpControlPointV1>, ) -> Self
Construct a V1 time-warp request.
Mapping validity is evaluated into a typed result rather than rejected by this structural constructor.
Sourcepub fn control_points(&self) -> Option<&[ContactTimeWarpControlPointV1]>
pub fn control_points(&self) -> Option<&[ContactTimeWarpControlPointV1]>
Ordered time-warp knots, or None for another operation.
Sourcepub const fn output_duration_s(&self) -> Option<f64>
pub const fn output_duration_s(&self) -> Option<f64>
Exact output duration declared by time-warp.
Trait Implementations§
Source§impl Clone for ContactTransformOperationV1
impl Clone for ContactTransformOperationV1
Source§fn clone(&self) -> ContactTransformOperationV1
fn clone(&self) -> ContactTransformOperationV1
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContactTransformOperationV1
impl Debug for ContactTransformOperationV1
Source§impl<'de> Deserialize<'de> for ContactTransformOperationV1
impl<'de> Deserialize<'de> for ContactTransformOperationV1
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for ContactTransformOperationV1
Auto Trait Implementations§
impl Freeze for ContactTransformOperationV1
impl RefUnwindSafe for ContactTransformOperationV1
impl Send for ContactTransformOperationV1
impl Sync for ContactTransformOperationV1
impl Unpin for ContactTransformOperationV1
impl UnsafeUnpin for ContactTransformOperationV1
impl UnwindSafe for ContactTransformOperationV1
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more