Struct sdl2::surface::SurfaceFlag[src]

pub struct SurfaceFlag {
    // some fields omitted
}

Methods

impl SurfaceFlag

fn empty() -> SurfaceFlag

Returns an empty set of flags.

fn all() -> SurfaceFlag

Returns the set containing all flags.

fn bits(&self) -> u32

Returns the raw value of the flags currently stored.

unsafe fn from_bits(bits: u32) -> SurfaceFlag

Convert from underlying bit representation. Unsafe because the bits are not guaranteed to represent valid flags.

fn is_empty(&self) -> bool

Returns true if no flags are currently stored.

fn is_all(&self) -> bool

Returns true if all flags are currently set.

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

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

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

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

fn insert(&mut self, other: SurfaceFlag)

Inserts the specified flags in-place.

fn remove(&mut self, other: SurfaceFlag)

Removes the specified flags in-place.

Trait Implementations

impl BitOr<SurfaceFlag, SurfaceFlag> for SurfaceFlag

fn bitor(&self, other: &SurfaceFlag) -> SurfaceFlag

Returns the union of the two sets of flags.

impl BitAnd<SurfaceFlag, SurfaceFlag> for SurfaceFlag

fn bitand(&self, other: &SurfaceFlag) -> SurfaceFlag

Returns the intersection between the two sets of flags.

impl Sub<SurfaceFlag, SurfaceFlag> for SurfaceFlag

fn sub(&self, other: &SurfaceFlag) -> SurfaceFlag

Returns the set difference of the two sets of flags.

impl Not<SurfaceFlag> for SurfaceFlag

fn not(&self) -> SurfaceFlag

Returns the complement of this set of flags.

Derived Implementations

impl Clone for SurfaceFlag

fn clone(&self) -> SurfaceFlag

impl TotalEq for SurfaceFlag

impl Eq for SurfaceFlag

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

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