Trait ttf_parser::parser::NumFrom

source ·
pub trait NumFrom<T>: Sized {
    // Required method
    fn num_from(_: T) -> Self;
}
Expand description

A safe u32 to usize casting.

Rust doesn’t implement From<u32> for usize, because it has to support 16 bit targets. We don’t, so we can allow this.

Required Methods§

source

fn num_from(_: T) -> Self

Converts u32 into usize.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl NumFrom<char> for usize

source§

fn num_from(v: char) -> Self

source§

impl NumFrom<u32> for usize

source§

fn num_from(v: u32) -> Self

Implementors§