#[non_exhaustive]pub enum Position {
Centre,
North,
NorthEast,
East,
SouthEast,
South,
SouthWest,
West,
NorthWest,
}Expand description
Which part of the image Fit::Cover keeps, and where Fit::Contain
places it: sharp’s position gravities.
The compass names follow sharp’s (north is the top edge); sharp’s
top, right top and so on are the same nine positions.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Centre
The middle, on both axes.
North
Top edge, centred across.
NorthEast
Top right corner.
East
Right edge, centred down.
SouthEast
Bottom right corner.
South
Bottom edge, centred across.
SouthWest
Bottom left corner.
West
Left edge, centred down.
NorthWest
Top left corner.
Trait Implementations§
impl Copy for Position
impl Eq for Position
impl StructuralPartialEq for Position
Auto Trait Implementations§
impl Freeze for Position
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnsafeUnpin for Position
impl UnwindSafe for Position
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