/// Convert this numeric value to a given unit, if possible.
///
/// # Examples
/// ```
/// # use rsass::value::{Numeric, Unit};
/// let inch = Numeric::new(1, Unit::In);
/// assert_eq!(inch.as_unit(Unit::Mm).unwrap() * 5, 127.into());
/// assert_eq!(inch.as_unit(Unit::Deg), None);
/// ```
Convert this numeric value to a given unit, if possible.
Convert this numeric value to a given unit if possible .
pub fn as_unit(&self, unit: Unit) -> Option<Number> {
        self.unit
            .scale_to_unit(&unit)
            .map(|scale| &self.value * &scale)
    }
pub fn as_unit ( & self , unit : Unit ) -> Option < Number > { self . unit . scale_to_unit ( & unit ) . map ( | scale | & self . value * & scale ) }
Convert this numeric value to a given unit, if possible.
Convert this numeric value to a given unit if possible .
&self
unit
Unit
examples
None
use rsass::value::{numeric, unit};
None