Trait text_layout::Num

source ·
pub trait Num
where Self: Default + Debug + Copy + PartialOrd<Self> + Add<Output = Self> + AddAssign + Sub<Output = Self> + SubAssign + Mul<Output = Self> + Div<Output = Self>,
{ const INFINITY: Self; const NEG_INFINITY: Self; // Required methods fn from(i: i16) -> Self; fn abs(self) -> Self; fn powi(self, y: u32) -> Self; // Provided method fn rat(num: i16, denom: i16) -> Self { ... } }
Expand description

A trait that describes the operations necessary for this crate’s layout algorithms.

Required Associated Constants§

source

const INFINITY: Self

source

const NEG_INFINITY: Self

Required Methods§

source

fn from(i: i16) -> Self

source

fn abs(self) -> Self

source

fn powi(self, y: u32) -> Self

Provided Methods§

source

fn rat(num: i16, denom: i16) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Num for f32

source§

const INFINITY: Self = +Inf_f32

source§

const NEG_INFINITY: Self = -Inf_f32

source§

fn from(i: i16) -> f32

source§

fn abs(self) -> f32

source§

fn powi(self, y: u32) -> f32

Implementors§

source§

impl<F: FixedSigned> Num for Fixed<F>

source§

const INFINITY: Self = Self::MAX

source§

const NEG_INFINITY: Self = Self::MIN