pub trait AnimatableField<T> {
// Required methods
fn static_val(&self) -> Option<T>
where T: Copy;
fn static_ref(&self) -> Option<&T>;
fn static_or_seed(&self) -> Option<T>
where T: Copy;
fn binding(&self) -> Option<&Binding>;
}Expand description
Read helpers for the Option<Animatable<T>> style fields, so read sites
stay as terse as the plain Option<T> they replaced.
Required Methods§
Sourcefn static_val(&self) -> Option<T>where
T: Copy,
fn static_val(&self) -> Option<T>where
T: Copy,
The static value by copy; None when absent or animated.
Sourcefn static_ref(&self) -> Option<&T>
fn static_ref(&self) -> Option<&T>
The static value by reference; None when absent or animated.
Sourcefn static_or_seed(&self) -> Option<T>where
T: Copy,
fn static_or_seed(&self) -> Option<T>where
T: Copy,
The static value — or, while animated, the wrapper’s seed; None
when absent or animated seed-less. The read helper for fields whose
consumers should render the seed until a driver writes (SVG shape
attrs); style read sites use Self::static_val instead (their
animated fields read as absent by design).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".