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

Width

Height

Methods

impl Size
[src]

[src]

A size with zero width and height.

[src]

Create a new Size from the given height and width.

[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));

[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]

[src]

Formats the value using the given formatter.

impl Copy for Size
[src]

impl Clone for Size
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for Size
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for Size
[src]

impl Hash for Size
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Display for Size
[src]

[src]

Formats the value using the given formatter. Read more