Trait ReasonableIntegerLike

Source
pub trait ReasonableIntegerLike:
    Default
    + Copy
    + Eq
    + Ord
    + Send
    + Sync
    + Debug
    + Hash {
    // Required methods
    fn fromusize(value: usize) -> Self;
    fn tousize(self) -> usize;
}
Expand description

Trait for data types suitable for use in CoordVec. Implemented for builtin unsigned integers, implement for other types at your own risk!

Required Methods§

Source

fn fromusize(value: usize) -> Self

Source

fn tousize(self) -> usize

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.

Implementations on Foreign Types§

Source§

impl ReasonableIntegerLike for u8

Source§

fn fromusize(value: usize) -> Self

Source§

fn tousize(self) -> usize

Source§

impl ReasonableIntegerLike for u16

Source§

fn fromusize(value: usize) -> Self

Source§

fn tousize(self) -> usize

Source§

impl ReasonableIntegerLike for u32

Source§

fn fromusize(value: usize) -> Self

Source§

fn tousize(self) -> usize

Source§

impl ReasonableIntegerLike for u64

Source§

fn fromusize(value: usize) -> Self

Source§

fn tousize(self) -> usize

Implementors§