Trait wiwi::num::IntoU8Lossless

source ·
pub trait IntoU8Lossless: Base {
    // Required method
    fn into_u8(self) -> u8;
}
Expand description

Lossless conversion into u8

That is, this trait is implemented for a number type, when it can be converted into a u8 while guaranteeing absolutely no losses for all possible values. This is not the same as an as cast!

Required Methods§

source

fn into_u8(self) -> u8

Losslessly converts self into u8

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl IntoU8Lossless for u8

source§

fn into_u8(self) -> u8

Implementors§