Struct pinteger::p16
[−]
[src]
pub struct p16 { /* fields omitted */ }
Methods
impl p16
[src]
const MIN: p16
MIN: p16 = p16{raw: 1,}
const MAX: p16
MAX: p16 = p16{raw: 0,}
fn one_plus(x: u16) -> Self
[src]
fn minus_one(self) -> u16
[src]
fn checked_from(x: u16) -> Option<Self>
[src]
fn ilog2(self) -> u32
[src]
fn is_power_of_two(self) -> bool
[src]
Trait Implementations
impl Copy for p16
[src]
impl Clone for p16
[src]
fn clone(&self) -> p16
[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 Eq for p16
[src]
impl PartialEq for p16
[src]
fn eq(&self, __arg_0: &p16) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &p16) -> bool
[src]
This method tests for !=
.
impl Ord for p16
[src]
fn cmp(&self, y: &Self) -> 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 PartialOrd for p16
[src]
fn partial_cmp(&self, y: &Self) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Add for p16
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, y: Self) -> Self::Output
[src]
Performs the +
operation.
impl Sub for p16
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, y: Self) -> Self::Output
[src]
Performs the -
operation.
impl Mul for p16
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, y: Self) -> Self::Output
[src]
Performs the *
operation.
impl Div for p16
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, y: Self) -> Self::Output
[src]
Performs the /
operation.
impl<'a> Add for &'a p16
[src]
type Output = p16
The resulting type after applying the +
operator.
fn add(self, y: Self) -> Self::Output
[src]
Performs the +
operation.
impl AddAssign for p16
[src]
fn add_assign(&mut self, y: Self)
[src]
Performs the +=
operation.
impl<'a> AddAssign<&'a p16> for p16
[src]
fn add_assign(&mut self, y: &'a Self)
[src]
Performs the +=
operation.
impl<'a> Sub for &'a p16
[src]
type Output = p16
The resulting type after applying the -
operator.
fn sub(self, y: Self) -> Self::Output
[src]
Performs the -
operation.
impl SubAssign for p16
[src]
fn sub_assign(&mut self, y: Self)
[src]
Performs the -=
operation.
impl<'a> SubAssign<&'a p16> for p16
[src]
fn sub_assign(&mut self, y: &'a Self)
[src]
Performs the -=
operation.
impl<'a> Mul for &'a p16
[src]
type Output = p16
The resulting type after applying the *
operator.
fn mul(self, y: Self) -> Self::Output
[src]
Performs the *
operation.
impl MulAssign for p16
[src]
fn mul_assign(&mut self, y: Self)
[src]
Performs the *=
operation.
impl<'a> MulAssign<&'a p16> for p16
[src]
fn mul_assign(&mut self, y: &'a Self)
[src]
Performs the *=
operation.
impl<'a> Div for &'a p16
[src]
type Output = p16
The resulting type after applying the /
operator.
fn div(self, y: Self) -> Self::Output
[src]
Performs the /
operation.
impl DivAssign for p16
[src]
fn div_assign(&mut self, y: Self)
[src]
Performs the /=
operation.
impl<'a> DivAssign<&'a p16> for p16
[src]
fn div_assign(&mut self, y: &'a Self)
[src]
Performs the /=
operation.