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

Interface Bits

src/traits.rs:376–392  ·  view source on GitHub ↗

A bits type that can be used as storage for a flags type. */

Source from the content-addressed store, hash-verified

374A bits type that can be used as storage for a flags type.
375*/
376pub trait Bits:
377 Clone
378 + Copy
379 + PartialEq
380 + BitAnd<Output = Self>
381 + BitOr<Output = Self>
382 + BitXor<Output = Self>
383 + Not<Output = Self>
384 + Sized
385 + 'static
386{
387 /// A value with all bits unset.
388 const EMPTY: Self;
389
390 /// A value with all bits set.
391 const ALL: Self;
392}
393
394// Not re-exported: prevent custom `Bits` impls being used in the `bitflags!` macro,
395// or they may fail to compile based on crate features

Callers

nothing calls this directly

Implementers 2

bitflags_custom_bits.rstests/compile-fail/bitflags_custom_bit
custom_bits_type.rsexamples/custom_bits_type.rs

Calls

no outgoing calls

Tested by

no test coverage detected