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

Method from_bits_truncate

src/traits.rs:201–203  ·  view source on GitHub ↗

Convert from a bits value, unsetting any unknown bits.

(bits: Self::Bits)

Source from the content-addressed store, hash-verified

199
200 /// Convert from a bits value, unsetting any unknown bits.
201 fn from_bits_truncate(bits: Self::Bits) -> Self {
202 Self::from_bits_retain(bits & Self::all().bits())
203 }
204
205 /// Convert from a bits value exactly.
206 fn from_bits_retain(bits: Self::Bits) -> Self;

Callers

nothing calls this directly

Implementers 2

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

Calls 1

bitsMethod · 0.45

Tested by

no test coverage detected