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.

Implementors§

Source§

impl ToUnsigned for UintRef

Available on crate feature alloc only.
Source§

impl<T: Unsigned> ToUnsigned for T