pub struct DelegateExpressionFfi { /* private fields */ }Expand description
Foreign function interface for composition animations based on calling closures.
Functions are overloaded by name, argument count and argument types. A call first looks for an overload whose parameter types are exactly the argument types, in registration order; then for one reachable by widening single-precision vector arguments to the double-precision vector types; then for one reachable by converting between the two vector families in either direction.
Implementations§
Source§impl DelegateExpressionFfi
impl DelegateExpressionFfi
Sourcepub fn add1<T1, R, F>(&mut self, name: &str, cb: F)where
T1: ExpressionVariantValue,
R: Into<ExpressionVariant>,
F: Fn(T1) -> R + Send + Sync + 'static,
pub fn add1<T1, R, F>(&mut self, name: &str, cb: F)where
T1: ExpressionVariantValue,
R: Into<ExpressionVariant>,
F: Fn(T1) -> R + Send + Sync + 'static,
Registers a function with one parameter.
Sourcepub fn add2<T1, T2, R, F>(&mut self, name: &str, cb: F)where
T1: ExpressionVariantValue,
T2: ExpressionVariantValue,
R: Into<ExpressionVariant>,
F: Fn(T1, T2) -> R + Send + Sync + 'static,
pub fn add2<T1, T2, R, F>(&mut self, name: &str, cb: F)where
T1: ExpressionVariantValue,
T2: ExpressionVariantValue,
R: Into<ExpressionVariant>,
F: Fn(T1, T2) -> R + Send + Sync + 'static,
Registers a function with two parameters.
Sourcepub fn add3<T1, T2, T3, R, F>(&mut self, name: &str, cb: F)where
T1: ExpressionVariantValue,
T2: ExpressionVariantValue,
T3: ExpressionVariantValue,
R: Into<ExpressionVariant>,
F: Fn(T1, T2, T3) -> R + Send + Sync + 'static,
pub fn add3<T1, T2, T3, R, F>(&mut self, name: &str, cb: F)where
T1: ExpressionVariantValue,
T2: ExpressionVariantValue,
T3: ExpressionVariantValue,
R: Into<ExpressionVariant>,
F: Fn(T1, T2, T3) -> R + Send + Sync + 'static,
Registers a function with three parameters.
Sourcepub fn add4<T1, T2, T3, T4, R, F>(&mut self, name: &str, cb: F)where
T1: ExpressionVariantValue,
T2: ExpressionVariantValue,
T3: ExpressionVariantValue,
T4: ExpressionVariantValue,
R: Into<ExpressionVariant>,
F: Fn(T1, T2, T3, T4) -> R + Send + Sync + 'static,
pub fn add4<T1, T2, T3, T4, R, F>(&mut self, name: &str, cb: F)where
T1: ExpressionVariantValue,
T2: ExpressionVariantValue,
T3: ExpressionVariantValue,
T4: ExpressionVariantValue,
R: Into<ExpressionVariant>,
F: Fn(T1, T2, T3, T4) -> R + Send + Sync + 'static,
Registers a function with four parameters.
Sourcepub fn add5<T1, T2, T3, T4, T5, R, F>(&mut self, name: &str, cb: F)where
T1: ExpressionVariantValue,
T2: ExpressionVariantValue,
T3: ExpressionVariantValue,
T4: ExpressionVariantValue,
T5: ExpressionVariantValue,
R: Into<ExpressionVariant>,
F: Fn(T1, T2, T3, T4, T5) -> R + Send + Sync + 'static,
pub fn add5<T1, T2, T3, T4, T5, R, F>(&mut self, name: &str, cb: F)where
T1: ExpressionVariantValue,
T2: ExpressionVariantValue,
T3: ExpressionVariantValue,
T4: ExpressionVariantValue,
T5: ExpressionVariantValue,
R: Into<ExpressionVariant>,
F: Fn(T1, T2, T3, T4, T5) -> R + Send + Sync + 'static,
Registers a function with five parameters.
Sourcepub fn add6<T1, T2, T3, T4, T5, T6, R, F>(&mut self, name: &str, cb: F)where
T1: ExpressionVariantValue,
T2: ExpressionVariantValue,
T3: ExpressionVariantValue,
T4: ExpressionVariantValue,
T5: ExpressionVariantValue,
T6: ExpressionVariantValue,
R: Into<ExpressionVariant>,
F: Fn(T1, T2, T3, T4, T5, T6) -> R + Send + Sync + 'static,
pub fn add6<T1, T2, T3, T4, T5, T6, R, F>(&mut self, name: &str, cb: F)where
T1: ExpressionVariantValue,
T2: ExpressionVariantValue,
T3: ExpressionVariantValue,
T4: ExpressionVariantValue,
T5: ExpressionVariantValue,
T6: ExpressionVariantValue,
R: Into<ExpressionVariant>,
F: Fn(T1, T2, T3, T4, T5, T6) -> R + Send + Sync + 'static,
Registers a function with six parameters.
As in the reference implementation, the sixth parameter is read from the fifth argument.
Sourcepub fn add16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R, F>(
&mut self,
name: &str,
cb: F,
)where
T1: ExpressionVariantValue,
T2: ExpressionVariantValue,
T3: ExpressionVariantValue,
T4: ExpressionVariantValue,
T5: ExpressionVariantValue,
T6: ExpressionVariantValue,
T7: ExpressionVariantValue,
T8: ExpressionVariantValue,
T9: ExpressionVariantValue,
T10: ExpressionVariantValue,
T11: ExpressionVariantValue,
T12: ExpressionVariantValue,
T13: ExpressionVariantValue,
T14: ExpressionVariantValue,
T15: ExpressionVariantValue,
T16: ExpressionVariantValue,
R: Into<ExpressionVariant>,
F: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) -> R + Send + Sync + 'static,
pub fn add16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R, F>(
&mut self,
name: &str,
cb: F,
)where
T1: ExpressionVariantValue,
T2: ExpressionVariantValue,
T3: ExpressionVariantValue,
T4: ExpressionVariantValue,
T5: ExpressionVariantValue,
T6: ExpressionVariantValue,
T7: ExpressionVariantValue,
T8: ExpressionVariantValue,
T9: ExpressionVariantValue,
T10: ExpressionVariantValue,
T11: ExpressionVariantValue,
T12: ExpressionVariantValue,
T13: ExpressionVariantValue,
T14: ExpressionVariantValue,
T15: ExpressionVariantValue,
T16: ExpressionVariantValue,
R: Into<ExpressionVariant>,
F: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) -> R + Send + Sync + 'static,
Registers a function with sixteen parameters.
As in the reference implementation, the sixth to sixteenth parameters are read from the fifth argument.
Trait Implementations§
Source§impl Default for DelegateExpressionFfi
impl Default for DelegateExpressionFfi
Source§impl IExpressionForeignFunctionInterface for DelegateExpressionFfi
impl IExpressionForeignFunctionInterface for DelegateExpressionFfi
Source§fn call(
&self,
name: &str,
arguments: &[ExpressionVariant],
) -> Option<ExpressionVariant>
fn call( &self, name: &str, arguments: &[ExpressionVariant], ) -> Option<ExpressionVariant>
None
when there is no function with that name accepting the arguments.Auto Trait Implementations§
impl !RefUnwindSafe for DelegateExpressionFfi
impl !UnwindSafe for DelegateExpressionFfi
impl Freeze for DelegateExpressionFfi
impl Send for DelegateExpressionFfi
impl Sync for DelegateExpressionFfi
impl Unpin for DelegateExpressionFfi
impl UnsafeUnpin for DelegateExpressionFfi
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more