Struct dsp::sample::types::I20
[−]
pub struct I20(_);
Methods
impl I20
fn new(val: i32) -> Option<I20>
Construct a new sample if the given value is within range.
Returns None
if val
is out of range.
fn new_unchecked(s: i32) -> I20
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 Default for I20
impl Ord for I20
impl PartialOrd<I20> for I20
fn partial_cmp(&self, __arg_0: &I20) -> Option<Ordering>
fn lt(&self, __arg_0: &I20) -> bool
fn le(&self, __arg_0: &I20) -> bool
fn gt(&self, __arg_0: &I20) -> bool
fn ge(&self, __arg_0: &I20) -> bool
impl Eq for I20
impl PartialEq<I20> for I20
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
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.
impl Clone for I20
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