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

Method toggle

src/traits.rs:312–317  ·  view source on GitHub ↗

The bitwise exclusive-or (`^`) of the bits in `self` and `other`.

(&mut self, other: Self)

Source from the content-addressed store, hash-verified

310
311 /// The bitwise exclusive-or (`^`) of the bits in `self` and `other`.
312 fn toggle(&mut self, other: Self)
313 where
314 Self: Sized,
315 {
316 *self = Self::from_bits_retain(self.bits()).symmetric_difference(other);
317 }
318
319 /// Call [`Flags::insert`] when `value` is `true` or [`Flags::remove`] when `value` is `false`.
320 fn set(&mut self, other: Self, value: bool)

Callers

nothing calls this directly

Implementers 2

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

Calls 2

symmetric_differenceMethod · 0.80
bitsMethod · 0.45

Tested by

no test coverage detected