Enum gpui2::DefiniteLength
source · pub enum DefiniteLength {
Absolute(AbsoluteLength),
Fraction(f32),
}
Expand description
A non-auto length that can be defined in pixels, rems, or percent of parent.
Variants§
Implementations§
source§impl DefiniteLength
impl DefiniteLength
pub fn to_pixels(&self, base_size: AbsoluteLength, rem_size: Pixels) -> Pixels
Trait Implementations§
source§impl Clone for DefiniteLength
impl Clone for DefiniteLength
source§fn clone(&self) -> DefiniteLength
fn clone(&self) -> DefiniteLength
Returns a copy 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 DefiniteLength
impl Debug for DefiniteLength
source§impl Default for DefiniteLength
impl Default for DefiniteLength
source§impl From<AbsoluteLength> for DefiniteLength
impl From<AbsoluteLength> for DefiniteLength
source§fn from(length: AbsoluteLength) -> Self
fn from(length: AbsoluteLength) -> Self
Converts to this type from the input type.
source§impl From<DefiniteLength> for Length
impl From<DefiniteLength> for Length
source§fn from(length: DefiniteLength) -> Self
fn from(length: DefiniteLength) -> Self
Converts to this type from the input type.
source§impl From<Pixels> for DefiniteLength
impl From<Pixels> for DefiniteLength
source§impl From<Rems> for DefiniteLength
impl From<Rems> for DefiniteLength
source§impl Neg for DefiniteLength
impl Neg for DefiniteLength
§type Output = DefiniteLength
type Output = DefiniteLength
The resulting type after applying the
-
operator.source§fn neg(self) -> DefiniteLength
fn neg(self) -> DefiniteLength
Performs the unary
-
operation. Read moreimpl Copy for DefiniteLength
Auto Trait Implementations§
impl RefUnwindSafe for DefiniteLength
impl Send for DefiniteLength
impl Sync for DefiniteLength
impl Unpin for DefiniteLength
impl UnwindSafe for DefiniteLength
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