logos.lang.num.newtypes

Module lang · package logos-lang

Types

structSaturating

struct Saturating

Newtype wrapper whose + / - clamp to T::MIN / T::MAX instead of overflowing.

Fields

v: T

The wrapped value.

Methods

fn add(self: Saturating<u64>, rhs: Saturating<u64>) -> Saturating<u64>
fn sub(self: Saturating<u64>, rhs: Saturating<u64>) -> Saturating<u64>

structWrapping

struct Wrapping

Newtype wrapper whose + / - / * silently wrap on overflow (two’s complement).

Fields

v: T

The wrapped value.

Methods

fn add(self: Wrapping<u64>, rhs: Wrapping<u64>) -> Wrapping<u64>
fn mul(self: Wrapping<u64>, rhs: Wrapping<u64>) -> Wrapping<u64>
fn sub(self: Wrapping<u64>, rhs: Wrapping<u64>) -> Wrapping<u64>