pub struct DecorationRef(/* private fields */);Expand description
A Decoration held by value: what a Dart field or parameter typed Decoration becomes.
Clones share one decoration, as Dart’s references do, so a decoration handed on keeps its
identity: a widget given the same decoration again sees an unchanged one. Two refs are equal
when they share a decoration or when eq_decoration says so,
Dart’s ==.
Implementations§
Source§impl DecorationRef
impl DecorationRef
Sourcepub fn new(decoration: impl Decoration) -> DecorationRef
pub fn new(decoration: impl Decoration) -> DecorationRef
Erases a Decoration.
Sourcepub fn lerp(
a: Option<&DecorationRef>,
b: Option<&DecorationRef>,
t: f64,
) -> Option<DecorationRef>
pub fn lerp( a: Option<&DecorationRef>, b: Option<&DecorationRef>, t: f64, ) -> Option<DecorationRef>
Linearly interpolates between two Decorations.
This attempts to use lerp_from and
lerp_to on b and a respectively to find a
solution. If the two values can’t directly be interpolated, then the
interpolation is done via null (at t == 0.5).
Trait Implementations§
Source§impl Animatable<DecorationRef> for DecorationTween
impl Animatable<DecorationRef> for DecorationTween
Source§fn transform(&self, _app: &App, t: f64) -> DecorationRef
fn transform(&self, _app: &App, t: f64) -> DecorationRef
Returns the value of the object at point
t. Read moreSource§fn evaluate(&self, app: &App, animation: AnyAnimation<f64>) -> Twhere
Self: Sized,
fn evaluate(&self, app: &App, animation: AnyAnimation<f64>) -> Twhere
Self: Sized,
The current value of this object for the given animation. Read more
Source§fn animate(
self,
app: &mut App,
parent: Retained<AnyAnimation<f64>>,
) -> Retained<AnyAnimation<T>>
fn animate( self, app: &mut App, parent: Retained<AnyAnimation<f64>>, ) -> Retained<AnyAnimation<T>>
Returns a new animation that is driven by the given animation but
that takes on values determined by this object. The new animation keeps
parent; whoever keeps the result keeps both.Source§fn chain<P>(self, parent: P) -> ChainedEvaluation<P, Self>
fn chain<P>(self, parent: P) -> ChainedEvaluation<P, Self>
Returns a new
Animatable whose value is determined by first
evaluating the given parent and then evaluating this object at the
result.Source§impl Clone for DecorationRef
impl Clone for DecorationRef
Source§fn clone(&self) -> DecorationRef
fn clone(&self) -> DecorationRef
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 DecorationRef
impl Debug for DecorationRef
Source§impl Deref for DecorationRef
impl Deref for DecorationRef
Source§type Target = dyn Decoration
type Target = dyn Decoration
The resulting type after dereferencing.
Source§fn deref(&self) -> &(dyn Decoration + 'static)
fn deref(&self) -> &(dyn Decoration + 'static)
Dereferences the value.
Source§impl Display for DecorationRef
Dart’s Decoration.toString, which the inner decoration’s Debug already renders.
impl Display for DecorationRef
Dart’s Decoration.toString, which the inner decoration’s Debug already renders.
Source§impl<T> From<T> for DecorationRefwhere
T: Decoration,
impl<T> From<T> for DecorationRefwhere
T: Decoration,
Source§fn from(decoration: T) -> DecorationRef
fn from(decoration: T) -> DecorationRef
Converts to this type from the input type.
Source§impl PartialEq for DecorationRef
impl PartialEq for DecorationRef
Source§impl TweenValue for DecorationRef
impl TweenValue for DecorationRef
Source§fn same(&self, other: &DecorationRef) -> bool
fn same(&self, other: &DecorationRef) -> bool
Dart’s
== between a widget’s target value and a tween endpoint.Auto Trait Implementations§
impl !RefUnwindSafe for DecorationRef
impl !Send for DecorationRef
impl !Sync for DecorationRef
impl !UnwindSafe for DecorationRef
impl Forget for DecorationRef
impl Freeze for DecorationRefwhere
*const RcInner<dyn Decoration> is !null: Freeze,
PhantomData<RcInner<dyn Decoration>>: Freeze,
impl Move for DecorationRef
impl Unpin for DecorationRef
impl UnsafeUnpin for DecorationRefwhere
*const RcInner<dyn Decoration> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Decoration>>: UnsafeUnpin,
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