#[non_exhaustive]pub struct PositionAxis {
pub from_end: bool,
pub offset: DefiniteLength,
}Expand description
One axis of a CSS <position>: a distance from the start edge (left,
top) or the end edge (right, bottom). Percentages are fractions of the
free space: the box’s size less the content’s (negative when the
content overflows), as CSS’s object-position resolves them.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.from_end: boolMeasured from the end edge (right, bottom) instead of the start.
offset: DefiniteLengthThe distance from that edge.
Implementations§
Source§impl PositionAxis
impl PositionAxis
Sourcepub const fn start(offset: DefiniteLength) -> Self
pub const fn start(offset: DefiniteLength) -> Self
offset from the start edge.
Sourcepub const fn end(offset: DefiniteLength) -> Self
pub const fn end(offset: DefiniteLength) -> Self
offset from the end edge.
Trait Implementations§
Source§impl Clone for PositionAxis
impl Clone for PositionAxis
impl Copy for PositionAxis
Source§impl Debug for PositionAxis
impl Debug for PositionAxis
Source§impl PartialEq for PositionAxis
impl PartialEq for PositionAxis
impl StructuralPartialEq for PositionAxis
Auto Trait Implementations§
impl Forget for PositionAxis
impl Freeze for PositionAxis
impl Move for PositionAxis
impl RefUnwindSafe for PositionAxis
impl Send for PositionAxis
impl Sync for PositionAxis
impl Unpin for PositionAxis
impl UnsafeUnpin for PositionAxis
impl UnwindSafe for PositionAxis
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