Struct smithay::utils::Size [−][src]
pub struct Size<N, Kind> { pub w: N, pub h: N, // some fields omitted }
Expand description
A size as defined by its width and height
Constructors of this type ensure that the values are always positive via
debug_assert!()
, however manually changing the values of the fields
can break this invariant.
Fields
w: N
horizontal coordinate
h: N
vertical coordinate
Implementations
Convert to i32 for integer-space manipulations by rounding float values
Convert to i32 for integer-space manipulations by flooring float values
Convert to i32 for integer-space manipulations by ceiling float values
Convert this physical point to logical coordinate space according to given scale factor
Convert this physical point to logical coordinate space according to given scale factor
Trait Implementations
Auto Trait Implementations
impl<N, Kind> RefUnwindSafe for Size<N, Kind> where
Kind: RefUnwindSafe,
N: RefUnwindSafe,
impl<N, Kind> UnwindSafe for Size<N, Kind> where
Kind: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
pub fn vzip(self) -> V