pub struct VisualTransition {
pub animation: Animation,
pub from_opacity: f32,
pub to_opacity: f32,
pub from_scale: f32,
pub to_scale: f32,
pub from_translate_x: i32,
pub to_translate_x: i32,
pub from_translate_y: i32,
pub to_translate_y: i32,
}Fields§
§animation: Animation§from_opacity: f32§to_opacity: f32§from_scale: f32§to_scale: f32§from_translate_x: i32§to_translate_x: i32§from_translate_y: i32§to_translate_y: i32Implementations§
Source§impl VisualTransition
impl VisualTransition
pub const fn new(animation: Animation) -> Self
pub const fn fade( animation: Animation, from_opacity: f32, to_opacity: f32, ) -> Self
pub const fn fade_scale( animation: Animation, from_opacity: f32, to_opacity: f32, from_scale: f32, to_scale: f32, ) -> Self
pub const fn fade_slide( animation: Animation, from_opacity: f32, to_opacity: f32, from: Offset, to: Offset, ) -> Self
pub const fn scale(animation: Animation, from_scale: f32, to_scale: f32) -> Self
pub const fn slide(animation: Animation, from: Offset, to: Offset) -> Self
pub const fn opacity(self, from: f32, to: f32) -> Self
pub const fn visual_scale(self, from: f32, to: f32) -> Self
pub const fn translation( self, from_x: i32, to_x: i32, from_y: i32, to_y: i32, ) -> Self
pub fn frame(self, elapsed_ms: u32) -> VisualTransitionFrame
pub fn slide_from( animation: Animation, edge: Edge, bounds: Bounds, distance: Option<u32>, ) -> Self
pub fn slide_to( animation: Animation, edge: Edge, bounds: Bounds, distance: Option<u32>, ) -> Self
Trait Implementations§
Source§impl Clone for VisualTransition
impl Clone for VisualTransition
Source§fn clone(&self) -> VisualTransition
fn clone(&self) -> VisualTransition
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 moreimpl Copy for VisualTransition
Source§impl Debug for VisualTransition
impl Debug for VisualTransition
Source§impl PartialEq for VisualTransition
impl PartialEq for VisualTransition
Source§fn eq(&self, other: &VisualTransition) -> bool
fn eq(&self, other: &VisualTransition) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for VisualTransition
Auto Trait Implementations§
impl Freeze for VisualTransition
impl RefUnwindSafe for VisualTransition
impl Send for VisualTransition
impl Sync for VisualTransition
impl Unpin for VisualTransition
impl UnsafeUnpin for VisualTransition
impl UnwindSafe for VisualTransition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.