Skip to main content

ToUnsigned

Trait ToUnsigned 

Source
pub trait ToUnsigned: AsRef<UintRef> + AsMut<UintRef> {
    type Unsigned: Unsigned;

    // Required method
    fn to_unsigned(&self) -> Self::Unsigned;

    // Provided method
    fn to_unsigned_zero(&self) -> Self::Unsigned { ... }
}
Expand description

Support for upgrading UintRef-compatible references into Unsigned.

Required Associated Types§

Source

type Unsigned: Unsigned

The corresponding owned Unsigned type.

Required Methods§

Source

fn to_unsigned(&self) -> Self::Unsigned

Convert from a reference into an owned instance.

Provided Methods§

Source

fn to_unsigned_zero(&self) -> Self::Unsigned

Convert from a reference into an owned instance representing zero.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§