Struct sample::types::i20::I20
[−]
[src]
pub struct I20(_);
Methods
impl I20
[src]
fn new(val: i32) -> Option<Self>
[src]
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
[src]
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
[src]
Return the internal value used to represent the sample type.
Trait Implementations
impl Copy for I20
[src]
impl Clone for I20
[src]
fn clone(&self) -> I20
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for I20
[src]
impl PartialEq for I20
[src]
fn eq(&self, __arg_0: &I20) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &I20) -> bool
[src]
This method tests for !=
.
impl Eq for I20
[src]
impl PartialOrd for I20
[src]
fn partial_cmp(&self, __arg_0: &I20) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &I20) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &I20) -> bool
[src]
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
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &I20) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for I20
[src]
fn cmp(&self, __arg_0: &I20) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more
impl Default for I20
[src]
impl From<i32> for I20
[src]
impl Add<I20> for I20
[src]
type Output = I20
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self
[src]
Performs the +
operation.
impl Sub<I20> for I20
[src]
type Output = I20
The resulting type after applying the -
operator.
fn sub(self, other: Self) -> Self
[src]
Performs the -
operation.
impl Mul<I20> for I20
[src]
type Output = I20
The resulting type after applying the *
operator.
fn mul(self, other: Self) -> Self
[src]
Performs the *
operation.
impl Div<I20> for I20
[src]
type Output = I20
The resulting type after applying the /
operator.
fn div(self, other: Self) -> Self
[src]
Performs the /
operation.
impl Not for I20
[src]
type Output = I20
The resulting type after applying the !
operator.
fn not(self) -> I20
[src]
Performs the unary !
operation.
impl Rem<I20> for I20
[src]
type Output = I20
The resulting type after applying the %
operator.
fn rem(self, other: Self) -> Self
[src]
Performs the %
operation.
impl Shl<I20> for I20
[src]
type Output = I20
The resulting type after applying the <<
operator.
fn shl(self, other: Self) -> Self
[src]
Performs the <<
operation.
impl Shr<I20> for I20
[src]
type Output = I20
The resulting type after applying the >>
operator.
fn shr(self, other: Self) -> Self
[src]
Performs the >>
operation.
impl BitAnd<I20> for I20
[src]
type Output = I20
The resulting type after applying the &
operator.
fn bitand(self, other: Self) -> Self
[src]
Performs the &
operation.
impl BitOr<I20> for I20
[src]
type Output = I20
The resulting type after applying the |
operator.
fn bitor(self, other: Self) -> Self
[src]
Performs the |
operation.
impl BitXor<I20> for I20
[src]
type Output = I20
The resulting type after applying the ^
operator.
fn bitxor(self, other: Self) -> Self
[src]
Performs the ^
operation.