pub enum DimensionUnit {
Pixel = 0,
Percentage = 37,
CharacterSpacing = 99,
}Expand description
Specifies the units of a Dimension.
Variants§
Pixel = 0
The amount is measured in pixels. For example, a frame with LEFT=50 TOP=25 starts 50
pixels from the left edge of the screen and 25 pixels from the top edge of the screen.
Percentage = 37
The amount is measured as a percentage. For example, a frame with LEFT="50%" TOP="25%"
starts halfway across the screen and 25% of the way from the top to the bottom.
CharacterSpacing = 99
The amount is measured in character size. For example, a frame with LEFT="50c" TOP="25c"
starts 50 character spacings from the left side of the screen (using the width of the
character X if it is a proportional font), and 25 character spacings from the top of the
screen (using the height of the capital X character).
Trait Implementations§
Source§impl Clone for DimensionUnit
impl Clone for DimensionUnit
Source§fn clone(&self) -> DimensionUnit
fn clone(&self) -> DimensionUnit
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DimensionUnit
impl Debug for DimensionUnit
Source§impl Default for DimensionUnit
impl Default for DimensionUnit
Source§fn default() -> DimensionUnit
fn default() -> DimensionUnit
Returns the “default value” for a type. Read more
Source§impl Display for DimensionUnit
impl Display for DimensionUnit
Source§impl PartialEq for DimensionUnit
impl PartialEq for DimensionUnit
impl Copy for DimensionUnit
impl Eq for DimensionUnit
impl StructuralPartialEq for DimensionUnit
Auto Trait Implementations§
impl Freeze for DimensionUnit
impl RefUnwindSafe for DimensionUnit
impl Send for DimensionUnit
impl Sync for DimensionUnit
impl Unpin for DimensionUnit
impl UnsafeUnpin for DimensionUnit
impl UnwindSafe for DimensionUnit
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