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