Struct sample::types::i20::I20 [] [src]

pub struct I20(_);

Methods

impl I20
[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 I20
[src]

fn from(val: i32) -> Self[]

Performs the conversion.

impl Add<I20> for I20
[src]

type Output = I20

The resulting type after applying the + operator

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

The method for the + operator

impl Sub<I20> for I20
[src]

type Output = I20

The resulting type after applying the - operator

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

The method for the - operator

impl Mul<I20> for I20
[src]

type Output = I20

The resulting type after applying the * operator

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

The method for the * operator

impl Div<I20> for I20
[src]

type Output = I20

The resulting type after applying the / operator

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

The method for the / operator

impl Not for I20
[src]

type Output = I20

The resulting type after applying the ! operator

fn not(self) -> I20[]

The method for the unary ! operator

impl Rem<I20> for I20
[src]

type Output = I20

The resulting type after applying the % operator

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

The method for the % operator

impl Shl<I20> for I20
[src]

type Output = I20

The resulting type after applying the << operator

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

The method for the << operator

impl Shr<I20> for I20
[src]

type Output = I20

The resulting type after applying the >> operator

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

The method for the >> operator

impl BitAnd<I20> for I20
[src]

type Output = I20

The resulting type after applying the & operator

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

The method for the & operator

impl BitOr<I20> for I20
[src]

type Output = I20

The resulting type after applying the | operator

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

The method for the | operator

impl BitXor<I20> for I20
[src]

type Output = I20

The resulting type after applying the ^ operator

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

The method for the ^ operator

impl From<i8> for I20
[src]

fn from(other: i8) -> Self[]

Performs the conversion.

impl From<I11> for I20
[src]

fn from(other: I11) -> Self[]

Performs the conversion.

impl From<i16> for I20
[src]

fn from(other: i16) -> Self[]

Performs the conversion.

impl From<u8> for I20
[src]

fn from(other: u8) -> Self[]

Performs the conversion.

impl From<U11> for I20
[src]

fn from(other: U11) -> Self[]

Performs the conversion.

impl From<u16> for I20
[src]

fn from(other: u16) -> Self[]

Performs the conversion.

Derived Implementations

impl Default for I20
[src]

fn default() -> I20[]

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

impl Ord for I20
[src]

fn cmp(&self, __arg_0: &I20) -> Ordering[]

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

impl PartialOrd for I20
[src]

fn partial_cmp(&self, __arg_0: &I20) -> Option<Ordering>[]

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

fn lt(&self, __arg_0: &I20) -> bool[]

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

fn le(&self, __arg_0: &I20) -> 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: &I20) -> bool[]

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

fn ge(&self, __arg_0: &I20) -> bool[]

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

impl Eq for I20
[src]

impl PartialEq for I20
[src]

fn eq(&self, __arg_0: &I20) -> bool[]

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

fn ne(&self, __arg_0: &I20) -> bool[]

This method tests for !=.

impl Debug for I20
[src]

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

Formats the value using the given formatter.

impl Clone for I20
[src]

fn clone(&self) -> I20[]

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 I20
[src]