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 turned into fractions.
Trait Implementations§
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 Freeze 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