pub struct Keyframe {
pub at: Option<f32>,
pub slots: Slots,
}Expand description
One stop. Every field is optional: at resolves by position, and a
slot a stop doesn’t name is left to its neighbours. Derefs to its
Slots, so stop.bg reads the slot.
Fields§
§at: Option<f32>Position in the cycle, 0..=1; None spreads evenly.
slots: SlotsWidth, height, bg, radius and opacity — the slots an entrance names too.
Implementations§
Source§impl Keyframe
impl Keyframe
Sourcepub fn width(self, width: impl Into<Sizing>) -> Keyframe
pub fn width(self, width: impl Into<Sizing>) -> Keyframe
A crate::spec::Sizing, or a number of px, as on a spec.
Sourcepub fn height(self, height: impl Into<Sizing>) -> Keyframe
pub fn height(self, height: impl Into<Sizing>) -> Keyframe
A crate::spec::Sizing, or a number of px, as on a spec.
Sourcepub fn grow_width(self) -> Keyframe
pub fn grow_width(self) -> Keyframe
width(Sizing::GROW), as on a spec.
Sourcepub fn grow_height(self) -> Keyframe
pub fn grow_height(self) -> Keyframe
height(Sizing::GROW), as on a spec.
pub fn bg(self, bg: Color) -> Keyframe
pub fn radius(self, radius: f32) -> Keyframe
pub fn opacity(self, opacity: f32) -> Keyframe
Trait Implementations§
impl Copy for Keyframe
impl StructuralPartialEq for Keyframe
Auto Trait Implementations§
impl Freeze for Keyframe
impl RefUnwindSafe for Keyframe
impl Send for Keyframe
impl Sync for Keyframe
impl Unpin for Keyframe
impl UnsafeUnpin for Keyframe
impl UnwindSafe for Keyframe
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.