pub trait TeXDimen:
Copy
+ Eq
+ Ord
+ Default
+ Debug
+ Display
+ Add<Self, Output = Self>
+ Sub<Self, Output = Self>
+ Neg<Output = Self>
+ Into<i64>
+ Sum {
const UNITS: &'static [&'static [u8]] = DEFAULT_UNITS;
// Required methods
fn scale_float(&self, times: f64) -> Self;
fn from_sp(sp: i32) -> Self;
fn from_float<ET: EngineTypes<Dim = Self>>(
engine: &EngineReferences<'_, ET>,
f: f64,
dim: &[u8],
) -> Self;
}Expand description
A TeX dimension. By default Dim32.
Provided Associated Constants§
Sourceconst UNITS: &'static [&'static [u8]] = DEFAULT_UNITS
const UNITS: &'static [&'static [u8]] = DEFAULT_UNITS
The units used in this dimension. By default DEFAULT_UNITS.
Required Methods§
Sourcefn scale_float(&self, times: f64) -> Self
fn scale_float(&self, times: f64) -> Self
Scales this dimension by a floating-point number.
Sourcefn from_sp(sp: i32) -> Self
fn from_sp(sp: i32) -> Self
Make a new dimension from a value in “scaled points” (sp = 1/65536 pt).
Sourcefn from_float<ET: EngineTypes<Dim = Self>>(
engine: &EngineReferences<'_, ET>,
f: f64,
dim: &[u8],
) -> Self
fn from_float<ET: EngineTypes<Dim = Self>>( engine: &EngineReferences<'_, ET>, f: f64, dim: &[u8], ) -> Self
Make a new dimension from a floating-point number and a unit. The unit is assumed to be in Self::UNITS.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.