Struct dummy_rustwlc::types::Size
[−]
[src]
#[repr(C)]pub struct Size { pub w: u32, pub h: u32, }
Represents the height and width of a view.
Fields
w: u32
Width
h: u32
Height
Methods
impl Size
[src]
fn zero() -> Size
[src]
A size with zero width and height.
fn new(w: u32, h: u32) -> Size
[src]
Create a new Size from the given height and width.
fn from_min_dimensions(a: Size, b: Size) -> Size
[src]
Creates a new size with a height and width of the smallest of the two sizes.
Examples:
let a = Size::new(0u32, 12u32); let b = Size::new(12u32, 0u32); assert_eq!(Size::from_min_dimensions(a, b), Size::new(0u32, 0u32));
fn from_max_dimensions(a: Size, b: Size) -> Size
[src]
Creates a new size with a height and width of the smallest of the two sizes.
Examples:
let a = Size::new(0u32, 12u32); let b = Size::new(12u32, 0u32); assert_eq!(Size::from_max_dimensions(a, b), Size::new(12u32, 12u32));
Trait Implementations
impl Debug for Size
[src]
impl Copy for Size
[src]
impl Clone for Size
[src]
fn clone(&self) -> Size
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for Size
[src]
fn eq(&self, __arg_0: &Size) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Size) -> bool
[src]
This method tests for !=
.
impl Eq for Size
[src]
impl Hash for Size
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more