[][src]Struct rsvg_internals::RsvgLength

#[repr(C)]pub struct RsvgLength {
    pub length: f64,
    pub unit: LengthUnit,

A CSS length value.

This is equivalent to CSS lengths.

It is up to the calling application to convert lengths in non-pixel units (i.e. those where the unit field is not LengthUnit::Px) into something meaningful to the application. For example, if your application knows the dots-per-inch (DPI) it is using, it can convert lengths with unit in LengthUnit::In or other physical units.


length: f64

Numeric part of the length

unit: LengthUnit

Unit part of the length


impl RsvgLength[src]

pub fn new(l: f64, unit: LengthUnit) -> RsvgLength[src]

Trait Implementations

impl Clone for RsvgLength[src]

impl Copy for RsvgLength[src]

impl Debug for RsvgLength[src]

impl<N: Normalize> From<Length<N>> for RsvgLength[src]

impl PartialEq<RsvgLength> for RsvgLength[src]

impl StructuralPartialEq for RsvgLength[src]

Auto Trait Implementations

impl RefUnwindSafe for RsvgLength

impl Send for RsvgLength

impl Sync for RsvgLength

impl Unpin for RsvgLength

impl UnwindSafe for RsvgLength

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Scalar for T where
    T: PartialEq<T> + Copy + Any + Debug

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,