[−][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]
R: RestrictedMath,
A: 'static + Sized + Copy,
type Arg = <R as RestrictedMath>::Arg
type Value = <R as RestrictedMath>::Value
fn checked_add(
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>
[src]
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>
fn checked_sub(
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>
[src]
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>
fn checked_mul(
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>
[src]
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>
Implementors
impl RestrictedMath for Restrict<u16>
[src]
type Arg = u16
type Value = u16
fn checked_add(
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>
[src]
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>
fn checked_sub(
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>
[src]
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>
fn checked_mul(
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>
[src]
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>
impl RestrictedMath for Restrict<u8>
[src]
type Arg = u8
type Value = u8
fn checked_add(
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>
[src]
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>
fn checked_sub(
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>
[src]
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>
fn checked_mul(
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>
[src]
&self,
arg: Self::Arg
) -> Result<Restrict<Self::Value>, Self::Arg>