#[non_exhaustive]pub struct ObjectPosition {
pub x: PositionAxis,
pub y: PositionAxis,
}Expand description
objectPosition: where an image sits in its box once
objectFit / object-* has sized it, as CSS’s object-position
places it (the center by default). The parts of a covering image
outside the box are cropped.
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.x: PositionAxisHorizontal.
y: PositionAxisVertical.
Implementations§
Source§impl ObjectPosition
impl ObjectPosition
Sourcepub const fn new(x: PositionAxis, y: PositionAxis) -> Self
pub const fn new(x: PositionAxis, y: PositionAxis) -> Self
A position of two axes.
Trait Implementations§
Source§impl Clone for ObjectPosition
impl Clone for ObjectPosition
impl Copy for ObjectPosition
Source§impl Debug for ObjectPosition
impl Debug for ObjectPosition
Source§impl Default for ObjectPosition
impl Default for ObjectPosition
Source§impl Display for ObjectPosition
impl Display for ObjectPosition
Source§impl PartialEq for ObjectPosition
impl PartialEq for ObjectPosition
impl StructuralPartialEq for ObjectPosition
Auto Trait Implementations§
impl Forget for ObjectPosition
impl Freeze for ObjectPosition
impl Move for ObjectPosition
impl RefUnwindSafe for ObjectPosition
impl Send for ObjectPosition
impl Sync for ObjectPosition
impl Unpin for ObjectPosition
impl UnsafeUnpin for ObjectPosition
impl UnwindSafe for ObjectPosition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<E> IntoThrown for Ewhere
E: Display,
impl<E> IntoThrown for Ewhere
E: Display,
Source§fn into_thrown(self) -> Thrown
fn into_thrown(self) -> Thrown
The exception.