pub struct LayoutOffset {
pub x: LayoutSize,
pub y: LayoutSize,
}Expand description
A box’s offset after layout: x right, y down.
Written as the object, or as the CSS translate value: one or two lengths, y 0 when
missing.
Fields§
§x: LayoutSizeRightward.
y: LayoutSizeDownward.
Implementations§
Source§impl LayoutOffset
impl LayoutOffset
Sourcepub fn without_px(self, shorter_side: f32) -> Self
pub fn without_px(self, shorter_side: f32) -> Self
The same offset with pixels converted to fractions.
Trait Implementations§
Source§impl AnimatedValue for LayoutOffset
impl AnimatedValue for LayoutOffset
Source§const ACCEPTS_DATA: bool = false
const ACCEPTS_DATA: bool = false
Whether the type takes the
data value mode.Source§const INTERPOLATES: bool = true
const INTERPOLATES: bool = true
Whether keyframes of the type can interpolate; those of the others only hold.
Source§const OFFSETS: bool = false
const OFFSETS: bool = false
Whether two values of the type have a difference to add: what
repeat_offset needs.Source§const VALUE_CURVES: bool = false
const VALUE_CURVES: bool = false
Whether a keyframe of the type can start a value curve (
ValueBezier).Source§const SPLIT: Option<(usize, usize)> = None
const SPLIT: Option<(usize, usize)> = None
The fewest and the most channels the type’s
split mode takes, or None for a type
without the mode.Source§fn takes_value_curve(&self) -> bool
fn takes_value_curve(&self) -> bool
Whether a keyframe holding this value may start or end a value curve.
Source§fn extrapolates(&self, extrapolation: Extrapolation) -> bool
fn extrapolates(&self, extrapolation: Extrapolation) -> bool
Whether keyframes holding this value may extrapolate by
extrapolation.Source§impl Clone for LayoutOffset
impl Clone for LayoutOffset
impl Copy for LayoutOffset
Source§impl Debug for LayoutOffset
impl Debug for LayoutOffset
Source§impl Default for LayoutOffset
impl Default for LayoutOffset
Source§impl<'de> Deserialize<'de> for LayoutOffset
impl<'de> Deserialize<'de> for LayoutOffset
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for LayoutOffset
impl PartialEq for LayoutOffset
Source§impl Serialize for LayoutOffset
impl Serialize for LayoutOffset
impl StructuralPartialEq for LayoutOffset
Auto Trait Implementations§
impl Forget for LayoutOffset
impl Freeze for LayoutOffset
impl Move for LayoutOffset
impl RefUnwindSafe for LayoutOffset
impl Send for LayoutOffset
impl Sync for LayoutOffset
impl Unpin for LayoutOffset
impl UnsafeUnpin for LayoutOffset
impl UnwindSafe for LayoutOffset
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