Struct sample::types::u20::U20 [] [src]

pub struct U20(_);

Methods

impl U20
[src]

fn new(val: i32) -> Option<Self>

Construct a new sample if the given value is within range.

Returns None if val is out of range.

fn new_unchecked(s: i32) -> Self

Constructs a new sample without checking for overflowing.

This should only be used if the user can guarantee the sample will be within range and they require the extra performance.

If this function is used, the sample crate can't guarantee that the returned sample or any interacting samples will remain within their MIN and MAX bounds.

fn inner(self) -> i32

Return the internal value used to represent the sample type.

Trait Implementations

impl From<i32> for U20
[src]

fn from(val: i32) -> Self

Performs the conversion.

impl Add<U20> for U20
[src]

type Output = U20

The resulting type after applying the + operator

fn add(self, other: Self) -> Self

The method for the + operator

impl Sub<U20> for U20
[src]

type Output = U20

The resulting type after applying the - operator

fn sub(self, other: Self) -> Self

The method for the - operator

impl Mul<U20> for U20
[src]

type Output = U20

The resulting type after applying the * operator

fn mul(self, other: Self) -> Self

The method for the * operator

impl Div<U20> for U20
[src]

type Output = U20

The resulting type after applying the / operator

fn div(self, other: Self) -> Self

The method for the / operator

impl Not for U20
[src]

type Output = U20

The resulting type after applying the ! operator

fn not(self) -> U20

The method for the unary ! operator

impl Rem<U20> for U20
[src]

type Output = U20

The resulting type after applying the % operator

fn rem(self, other: Self) -> Self

The method for the % operator

impl Shl<U20> for U20
[src]

type Output = U20

The resulting type after applying the << operator

fn shl(self, other: Self) -> Self

The method for the << operator

impl Shr<U20> for U20
[src]

type Output = U20

The resulting type after applying the >> operator

fn shr(self, other: Self) -> Self

The method for the >> operator

impl BitAnd<U20> for U20
[src]

type Output = U20

The resulting type after applying the & operator

fn bitand(self, other: Self) -> Self

The method for the & operator

impl BitOr<U20> for U20
[src]

type Output = U20

The resulting type after applying the | operator

fn bitor(self, other: Self) -> Self

The method for the | operator

impl BitXor<U20> for U20
[src]

type Output = U20

The resulting type after applying the ^ operator

fn bitxor(self, other: Self) -> Self

The method for the ^ operator

impl From<u8> for U20
[src]

fn from(other: u8) -> Self

Performs the conversion.

impl From<u16> for U20
[src]

fn from(other: u16) -> Self

Performs the conversion.

Derived Implementations

impl Default for U20
[src]

fn default() -> U20

Returns the "default value" for a type. Read more

impl Ord for U20
[src]

fn cmp(&self, __arg_0: &U20) -> Ordering

This method returns an Ordering between self and other. Read more

impl PartialOrd for U20
[src]

fn partial_cmp(&self, __arg_0: &U20) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more

fn lt(&self, __arg_0: &U20) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more

fn le(&self, __arg_0: &U20) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn gt(&self, __arg_0: &U20) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more

fn ge(&self, __arg_0: &U20) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Eq for U20
[src]

impl PartialEq for U20
[src]

fn eq(&self, __arg_0: &U20) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &U20) -> bool

This method tests for !=.

impl Debug for U20
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for U20
[src]

fn clone(&self) -> U20

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Copy for U20
[src]