Struct rustc::middle::ty::TraitFlags [−] [src]

pub struct TraitFlags {
    // some fields omitted
}
Unstable

Methods

impl TraitFlags

const NO_TRAIT_FLAGS: TraitFlags = $ BitFlags { bits : $ value }

Unstable

const HAS_DEFAULT_IMPL: TraitFlags = $ BitFlags { bits : $ value }

Unstable

const IS_OBJECT_SAFE: TraitFlags = $ BitFlags { bits : $ value }

Unstable

const OBJECT_SAFETY_VALID: TraitFlags = $ BitFlags { bits : $ value }

Unstable

const IMPLS_VALID: TraitFlags = $ BitFlags { bits : $ value }

Unstable

fn empty() -> TraitFlags

Unstable

Returns an empty set of flags.

fn all() -> TraitFlags

Unstable

Returns the set containing all flags.

fn bits(&self) -> u32

Unstable

Returns the raw value of the flags currently stored.

fn from_bits(bits: u32) -> Option<TraitFlags>

Unstable

Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.

fn from_bits_truncate(bits: u32) -> TraitFlags

Unstable

Convert from underlying bit representation, dropping any bits that do not correspond to flags.

fn is_empty(&self) -> bool

Unstable

Returns true if no flags are currently stored.

fn is_all(&self) -> bool

Unstable

Returns true if all flags are currently set.

fn intersects(&self, other: TraitFlags) -> bool

Unstable

Returns true if there are flags common to both self and other.

fn contains(&self, other: TraitFlags) -> bool

Unstable

Returns true all of the flags in other are contained within self.

fn insert(&mut self, other: TraitFlags)

Unstable

Inserts the specified flags in-place.

fn remove(&mut self, other: TraitFlags)

Unstable

Removes the specified flags in-place.

fn toggle(&mut self, other: TraitFlags)

Unstable

Toggles the specified flags in-place.

Trait Implementations

impl BitOr for TraitFlags

type Output = TraitFlags

fn bitor(self, other: TraitFlags) -> TraitFlags

impl BitXor for TraitFlags

type Output = TraitFlags

fn bitxor(self, other: TraitFlags) -> TraitFlags

impl BitAnd for TraitFlags

type Output = TraitFlags

fn bitand(self, other: TraitFlags) -> TraitFlags

impl Sub for TraitFlags

type Output = TraitFlags

fn sub(self, other: TraitFlags) -> TraitFlags

impl Not for TraitFlags

type Output = TraitFlags

fn not(self) -> TraitFlags

Derived Implementations

impl Hash for TraitFlags

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl Ord for TraitFlags

fn cmp(&self, __arg_0: &TraitFlags) -> Ordering

impl PartialOrd for TraitFlags

fn partial_cmp(&self, __arg_0: &TraitFlags) -> Option<Ordering>

fn lt(&self, __arg_0: &TraitFlags) -> bool

fn le(&self, __arg_0: &TraitFlags) -> bool

fn gt(&self, __arg_0: &TraitFlags) -> bool

fn ge(&self, __arg_0: &TraitFlags) -> bool

impl Clone for TraitFlags

fn clone(&self) -> TraitFlags

fn clone_from(&mut self, source: &Self)

impl Eq for TraitFlags

impl PartialEq for TraitFlags

fn eq(&self, __arg_0: &TraitFlags) -> bool

fn ne(&self, __arg_0: &TraitFlags) -> bool

impl Copy for TraitFlags