Enum vizia_core::style::LengthOrPercentage
pub enum LengthOrPercentage {
Length(Length),
Percentage(f32),
}
Expand description
A length or a percentage value.
Variants§
Implementations§
§impl LengthOrPercentage
impl LengthOrPercentage
Trait Implementations§
§impl Clone for LengthOrPercentage
impl Clone for LengthOrPercentage
§fn clone(&self) -> LengthOrPercentage
fn clone(&self) -> LengthOrPercentage
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 more§impl Debug for LengthOrPercentage
impl Debug for LengthOrPercentage
§impl Default for LengthOrPercentage
impl Default for LengthOrPercentage
§fn default() -> LengthOrPercentage
fn default() -> LengthOrPercentage
Returns the “default value” for a type. Read more
§impl From<&str> for LengthOrPercentage
impl From<&str> for LengthOrPercentage
§fn from(s: &str) -> LengthOrPercentage
fn from(s: &str) -> LengthOrPercentage
Converts to this type from the input type.
§impl From<BorderWidthValue> for LengthOrPercentage
impl From<BorderWidthValue> for LengthOrPercentage
§fn from(border_width_value: BorderWidthValue) -> LengthOrPercentage
fn from(border_width_value: BorderWidthValue) -> LengthOrPercentage
Converts to this type from the input type.
§impl From<HorizontalPositionKeyword> for LengthOrPercentage
impl From<HorizontalPositionKeyword> for LengthOrPercentage
§fn from(value: HorizontalPositionKeyword) -> LengthOrPercentage
fn from(value: HorizontalPositionKeyword) -> LengthOrPercentage
Converts to this type from the input type.
§impl From<Length> for LengthOrPercentage
impl From<Length> for LengthOrPercentage
§fn from(length: Length) -> LengthOrPercentage
fn from(length: Length) -> LengthOrPercentage
Converts to this type from the input type.
§impl From<LengthOrPercentage> for ClipPath
impl From<LengthOrPercentage> for ClipPath
§fn from(value: LengthOrPercentage) -> ClipPath
fn from(value: LengthOrPercentage) -> ClipPath
Converts to this type from the input type.
§impl From<LengthValue> for LengthOrPercentage
impl From<LengthValue> for LengthOrPercentage
§fn from(value: LengthValue) -> LengthOrPercentage
fn from(value: LengthValue) -> LengthOrPercentage
Converts to this type from the input type.
§impl From<Percentage> for LengthOrPercentage
impl From<Percentage> for LengthOrPercentage
§fn from(percentage: Percentage) -> LengthOrPercentage
fn from(percentage: Percentage) -> LengthOrPercentage
Converts to this type from the input type.
§impl From<PositionComponent<HorizontalPositionKeyword>> for LengthOrPercentage
impl From<PositionComponent<HorizontalPositionKeyword>> for LengthOrPercentage
§fn from(
value: PositionComponent<HorizontalPositionKeyword>,
) -> LengthOrPercentage
fn from( value: PositionComponent<HorizontalPositionKeyword>, ) -> LengthOrPercentage
Converts to this type from the input type.
§impl From<PositionComponent<VerticalPositionKeyword>> for LengthOrPercentage
impl From<PositionComponent<VerticalPositionKeyword>> for LengthOrPercentage
§fn from(value: PositionComponent<VerticalPositionKeyword>) -> LengthOrPercentage
fn from(value: PositionComponent<VerticalPositionKeyword>) -> LengthOrPercentage
Converts to this type from the input type.
§impl From<Units> for LengthOrPercentage
impl From<Units> for LengthOrPercentage
§fn from(units: Units) -> LengthOrPercentage
fn from(units: Units) -> LengthOrPercentage
Converts to this type from the input type.
§impl From<VerticalPositionKeyword> for LengthOrPercentage
impl From<VerticalPositionKeyword> for LengthOrPercentage
§fn from(value: VerticalPositionKeyword) -> LengthOrPercentage
fn from(value: VerticalPositionKeyword) -> LengthOrPercentage
Converts to this type from the input type.
§impl<'i> Parse<'i> for LengthOrPercentage
impl<'i> Parse<'i> for LengthOrPercentage
fn parse<'t>( input: &mut Parser<'i, 't>, ) -> Result<LengthOrPercentage, ParseError<'i, CustomParseError<'i>>>
§impl PartialEq for LengthOrPercentage
impl PartialEq for LengthOrPercentage
source§impl Res<LengthOrPercentage> for LengthOrPercentage
impl Res<LengthOrPercentage> for LengthOrPercentage
source§impl ResGet<LengthOrPercentage> for LengthOrPercentage
impl ResGet<LengthOrPercentage> for LengthOrPercentage
fn get_ref<'a>(&'a self, _: &'a impl DataContext) -> Option<LensValue<'a, Self>>
fn get(&self, _: &impl DataContext) -> Self
impl StructuralPartialEq for LengthOrPercentage
Auto Trait Implementations§
impl Freeze for LengthOrPercentage
impl RefUnwindSafe for LengthOrPercentage
impl Send for LengthOrPercentage
impl Sync for LengthOrPercentage
impl Unpin for LengthOrPercentage
impl UnwindSafe for LengthOrPercentage
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.