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

Method set

src/traits.rs:320–329  ·  view source on GitHub ↗

Call [`Flags::insert`] when `value` is `true` or [`Flags::remove`] when `value` is `false`.

(&mut self, other: Self, value: bool)

Source from the content-addressed store, hash-verified

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)
321 where
322 Self: Sized,
323 {
324 if value {
325 self.insert(other);
326 } else {
327 self.remove(other);
328 }
329 }
330
331 /// Unsets all bits in the flags.
332 fn clear(&mut self)

Callers

nothing calls this directly

Implementers 2

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

Calls 2

insertMethod · 0.80
removeMethod · 0.80

Tested by

no test coverage detected