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>) -> Self
pub fn width(self, width: impl Into<Sizing>) -> Self
A crate::spec::Sizing, or a number of px, as on a spec.
Sourcepub fn height(self, height: impl Into<Sizing>) -> Self
pub fn height(self, height: impl Into<Sizing>) -> Self
A crate::spec::Sizing, or a number of px, as on a spec.
Sourcepub fn grow_width(self) -> Self
pub fn grow_width(self) -> Self
width(Sizing::GROW), as on a spec.
Sourcepub fn grow_height(self) -> Self
pub fn grow_height(self) -> Self
height(Sizing::GROW), as on a spec.
pub fn bg(self, bg: Color) -> Self
pub fn radius(self, radius: f32) -> Self
pub fn opacity(self, opacity: f32) -> Self
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