[−][src]Trait trust_dns_proto::serialize::binary::RestrictedMath
Common checked math operations for the Restrict type
Associated Types
type Arg: 'static + Sized + Copy
Argument for the math operations
type Value: 'static + Sized + Copy
Return value, generally the same as Arg
Required methods
fn checked_add(
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>
Checked addition, see usize::checked_add
fn checked_sub(
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>
Checked subtraction, see usize::checked_sub
fn checked_mul(
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>
Checked multiplication, see usize::checked_mul
Implementations on Foreign Types
impl<R, A> RestrictedMath for Result<R, A> where
R: RestrictedMath,
A: 'static + Sized + Copy,
[src]
impl<R, A> RestrictedMath for Result<R, A> where
R: RestrictedMath,
A: 'static + Sized + Copy,
type Arg = <R as RestrictedMath>::Arg
type Value = <R as RestrictedMath>::Value
fn checked_add( | [src] |
fn checked_sub( | [src] |
fn checked_mul( | [src] |
Implementors
impl RestrictedMath for Restrict<u16>
[src]
impl RestrictedMath for Restrict<u16>
type Arg = u16
type Value = u16
fn checked_add( | [src] |
fn checked_sub( | [src] |
fn checked_mul( | [src] |
impl RestrictedMath for Restrict<u8>
[src]
impl RestrictedMath for Restrict<u8>
type Arg = u8
type Value = u8
fn checked_add( | [src] |
fn checked_sub( | [src] |
fn checked_mul( | [src] |
impl RestrictedMath for Restrict<usize>
[src]
impl RestrictedMath for Restrict<usize>