Trait std::ops::DivAssign
pub trait DivAssign<Rhs = Self> { fn div_assign(&mut self, rhs: Rhs); }
The division assignment operator /=
.
Examples
use std::ops::DivAssign; #[derive(Debug, PartialEq)] struct Frequency { hertz: f64 } impl DivAssign<f64> for Frequency { fn div_assign(&mut self, rhs: f64) { self.hertz /= rhs; } } let mut frequency = Frequency { hertz: 200.0 }; frequency /= 4.0; assert_eq!(Frequency { hertz: 50.0 }, frequency);
Required methods
fn div_assign(&mut self, rhs: Rhs)
Performs the /=
operation.
Example
let mut x: u32 = 12; x /= 2; assert_eq!(x, 6);
Implementors
impl DivAssign<f32> for f32
impl DivAssign<f64> for f64
impl DivAssign<i8> for i8
impl DivAssign<i16> for i16
impl DivAssign<i32> for i32
impl DivAssign<i64> for i64
impl DivAssign<i128> for i128
impl DivAssign<isize> for isize
impl DivAssign<u8> for u8
impl DivAssign<u16> for u16
impl DivAssign<u32> for u32
[src]1.9.0
impl DivAssign<u32> for Duration
impl DivAssign<u64> for u64
impl DivAssign<u128> for u128
impl DivAssign<usize> for usize
impl DivAssign<Saturating<i8>> for Saturating<i8>
impl DivAssign<Saturating<i16>> for Saturating<i16>
impl DivAssign<Saturating<i32>> for Saturating<i32>
impl DivAssign<Saturating<i64>> for Saturating<i64>
impl DivAssign<Saturating<i128>> for Saturating<i128>
impl DivAssign<Saturating<isize>> for Saturating<isize>
impl DivAssign<Saturating<u8>> for Saturating<u8>
impl DivAssign<Saturating<u16>> for Saturating<u16>
impl DivAssign<Saturating<u32>> for Saturating<u32>
impl DivAssign<Saturating<u64>> for Saturating<u64>
impl DivAssign<Saturating<u128>> for Saturating<u128>
impl DivAssign<Saturating<usize>> for Saturating<usize>
impl DivAssign<Wrapping<i8>> for Wrapping<i8>
impl DivAssign<Wrapping<i16>> for Wrapping<i16>
impl DivAssign<Wrapping<i32>> for Wrapping<i32>
impl DivAssign<Wrapping<i64>> for Wrapping<i64>
impl DivAssign<Wrapping<i128>> for Wrapping<i128>
impl DivAssign<Wrapping<isize>> for Wrapping<isize>
impl DivAssign<Wrapping<u8>> for Wrapping<u8>
impl DivAssign<Wrapping<u16>> for Wrapping<u16>
impl DivAssign<Wrapping<u32>> for Wrapping<u32>
impl DivAssign<Wrapping<u64>> for Wrapping<u64>
impl DivAssign<Wrapping<u128>> for Wrapping<u128>
impl DivAssign<Wrapping<usize>> for Wrapping<usize>
[src]1.22.0
impl<'_> DivAssign<&'_ f32> for f32
[src]1.22.0
impl<'_> DivAssign<&'_ f64> for f64
[src]1.22.0
impl<'_> DivAssign<&'_ i8> for i8
[src]1.22.0
impl<'_> DivAssign<&'_ i16> for i16
[src]1.22.0
impl<'_> DivAssign<&'_ i32> for i32
[src]1.22.0
impl<'_> DivAssign<&'_ i64> for i64
[src]1.22.0
impl<'_> DivAssign<&'_ i128> for i128
[src]1.22.0
impl<'_> DivAssign<&'_ isize> for isize
[src]1.22.0
impl<'_> DivAssign<&'_ u8> for u8
[src]1.22.0
impl<'_> DivAssign<&'_ u16> for u16
[src]1.22.0
impl<'_> DivAssign<&'_ u32> for u32
[src]1.22.0
impl<'_> DivAssign<&'_ u64> for u64
[src]1.22.0
impl<'_> DivAssign<&'_ u128> for u128
[src]1.22.0
impl<'_> DivAssign<&'_ usize> for usize
[src]1.22.0
impl<'_> DivAssign<&'_ Saturating<i8>> for Saturating<i8>
[src]1.22.0
impl<'_> DivAssign<&'_ Saturating<i16>> for Saturating<i16>
[src]1.22.0
impl<'_> DivAssign<&'_ Saturating<i32>> for Saturating<i32>
[src]1.22.0
impl<'_> DivAssign<&'_ Saturating<i64>> for Saturating<i64>
[src]1.22.0
impl<'_> DivAssign<&'_ Saturating<i128>> for Saturating<i128>
[src]1.22.0
impl<'_> DivAssign<&'_ Saturating<isize>> for Saturating<isize>
[src]1.22.0
impl<'_> DivAssign<&'_ Saturating<u8>> for Saturating<u8>
[src]1.22.0
impl<'_> DivAssign<&'_ Saturating<u16>> for Saturating<u16>
[src]1.22.0
impl<'_> DivAssign<&'_ Saturating<u32>> for Saturating<u32>
[src]1.22.0
impl<'_> DivAssign<&'_ Saturating<u64>> for Saturating<u64>
[src]1.22.0
impl<'_> DivAssign<&'_ Saturating<u128>> for Saturating<u128>
[src]1.22.0
impl<'_> DivAssign<&'_ Saturating<usize>> for Saturating<usize>
[src]1.22.0
impl<'_> DivAssign<&'_ Wrapping<i8>> for Wrapping<i8>
[src]1.22.0
impl<'_> DivAssign<&'_ Wrapping<i16>> for Wrapping<i16>
[src]1.22.0
impl<'_> DivAssign<&'_ Wrapping<i32>> for Wrapping<i32>
[src]1.22.0
impl<'_> DivAssign<&'_ Wrapping<i64>> for Wrapping<i64>
[src]1.22.0
impl<'_> DivAssign<&'_ Wrapping<i128>> for Wrapping<i128>
[src]1.22.0
impl<'_> DivAssign<&'_ Wrapping<isize>> for Wrapping<isize>
[src]1.22.0
impl<'_> DivAssign<&'_ Wrapping<u8>> for Wrapping<u8>
[src]1.22.0
impl<'_> DivAssign<&'_ Wrapping<u16>> for Wrapping<u16>
[src]1.22.0
impl<'_> DivAssign<&'_ Wrapping<u32>> for Wrapping<u32>
[src]1.22.0
impl<'_> DivAssign<&'_ Wrapping<u64>> for Wrapping<u64>
[src]1.22.0
impl<'_> DivAssign<&'_ Wrapping<u128>> for Wrapping<u128>
[src]1.22.0
impl<'_> DivAssign<&'_ Wrapping<usize>> for Wrapping<usize>
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/ops/trait.DivAssign.html