Skip to main content

ToU64

Trait ToU64 

Source
pub trait ToU64 {
    // Required method
    fn to_u64(&self) -> u64;
}
Expand description

Trait defining instance method to_u64() : u64 that provides a no-cost or low-cost conversion into u64.

It is expected that the implementing type “is-a” u64 in a logical manner.

§Additional Implementations on Foreign Types

§Built-in Types

If the feature "implement-ToU64-for-built_ins" is defined (as it is by "default"), then this is also implemented for the following type(s):

Required Methods§

Source

fn to_u64(&self) -> u64

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ToU64 for u8

Source§

fn to_u64(&self) -> u64

Source§

impl ToU64 for u16

Source§

fn to_u64(&self) -> u64

Source§

impl ToU64 for u32

Source§

fn to_u64(&self) -> u64

Source§

impl ToU64 for u64

Source§

fn to_u64(&self) -> u64

Source§

impl<T: ToU64 + ?Sized> ToU64 for Box<T>

Available on non-crate feature nostd only.
Source§

fn to_u64(&self) -> u64

Source§

impl<T: ToU64 + ?Sized> ToU64 for Rc<T>

Available on non-crate feature nostd only.
Source§

fn to_u64(&self) -> u64

Implementors§