MCPcopy Create free account
hub / github.com/bitflags/bitflags / remove

Method remove

src/traits.rs:304–309  ·  view source on GitHub ↗

The intersection of `self` with the complement of `other` (`&!`). This method is not equivalent to `self & !other` when `other` has unknown bits set. `remove` won't truncate `other`, but the `!` operator will.

(&mut self, other: Self)

Source from the content-addressed store, hash-verified

302 /// This method is not equivalent to `self & !other` when `other` has unknown bits set.
303 /// `remove` won't truncate `other`, but the `!` operator will.
304 fn remove(&mut self, other: Self)
305 where
306 Self: Sized,
307 {
308 *self = Self::from_bits_retain(self.bits()).difference(other);
309 }
310
311 /// The bitwise exclusive-or (`^`) of the bits in `self` and `other`.
312 fn toggle(&mut self, other: Self)

Callers 2

setMethod · 0.80
nextMethod · 0.80

Implementers 2

macro_free.rsexamples/macro_free.rs
custom_bits_type.rsexamples/custom_bits_type.rs

Calls 2

differenceMethod · 0.80
bitsMethod · 0.45

Tested by

no test coverage detected