[−]Struct blend2d::DataAccessFlags
Methods
impl DataAccessFlags
pub const READ: DataAccessFlags
pub const WRITE: DataAccessFlags
pub const READ_WRITE: DataAccessFlags
pub fn empty() -> DataAccessFlags
Returns an empty set of flags.
pub fn all() -> DataAccessFlags
Returns the set containing all flags.
pub fn bits(&self) -> u32
Returns the raw value of the flags currently stored.
pub fn from_bits(bits: u32) -> Option<DataAccessFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub fn from_bits_truncate(bits: u32) -> DataAccessFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub fn is_empty(&self) -> bool
Returns true
if no flags are currently stored.
pub fn is_all(&self) -> bool
Returns true
if all flags are currently set.
pub fn intersects(&self, other: DataAccessFlags) -> bool
Returns true
if there are flags common to both self
and other
.
pub fn contains(&self, other: DataAccessFlags) -> bool
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: DataAccessFlags)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: DataAccessFlags)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: DataAccessFlags)
Toggles the specified flags in-place.
pub fn set(&mut self, other: DataAccessFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl PartialEq<DataAccessFlags> for DataAccessFlags
fn eq(&self, other: &DataAccessFlags) -> bool
fn ne(&self, other: &DataAccessFlags) -> bool
impl Clone for DataAccessFlags
fn clone(&self) -> DataAccessFlags
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Extend<DataAccessFlags> for DataAccessFlags
fn extend<T: IntoIterator<Item = DataAccessFlags>>(&mut self, iterator: T)
impl PartialOrd<DataAccessFlags> for DataAccessFlags
fn partial_cmp(&self, other: &DataAccessFlags) -> Option<Ordering>
fn lt(&self, other: &DataAccessFlags) -> bool
fn le(&self, other: &DataAccessFlags) -> bool
fn gt(&self, other: &DataAccessFlags) -> bool
fn ge(&self, other: &DataAccessFlags) -> bool
impl Eq for DataAccessFlags
impl Ord for DataAccessFlags
fn cmp(&self, other: &DataAccessFlags) -> Ordering
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl Copy for DataAccessFlags
impl Debug for DataAccessFlags
impl Sub<DataAccessFlags> for DataAccessFlags
type Output = DataAccessFlags
The resulting type after applying the -
operator.
fn sub(self, other: DataAccessFlags) -> DataAccessFlags
Returns the set difference of the two sets of flags.
impl SubAssign<DataAccessFlags> for DataAccessFlags
fn sub_assign(&mut self, other: DataAccessFlags)
Disables all flags enabled in the set.
impl Not for DataAccessFlags
type Output = DataAccessFlags
The resulting type after applying the !
operator.
fn not(self) -> DataAccessFlags
Returns the complement of this set of flags.
impl BitAnd<DataAccessFlags> for DataAccessFlags
type Output = DataAccessFlags
The resulting type after applying the &
operator.
fn bitand(self, other: DataAccessFlags) -> DataAccessFlags
Returns the intersection between the two sets of flags.
impl BitOr<DataAccessFlags> for DataAccessFlags
type Output = DataAccessFlags
The resulting type after applying the |
operator.
fn bitor(self, other: DataAccessFlags) -> DataAccessFlags
Returns the union of the two sets of flags.
impl BitXor<DataAccessFlags> for DataAccessFlags
type Output = DataAccessFlags
The resulting type after applying the ^
operator.
fn bitxor(self, other: DataAccessFlags) -> DataAccessFlags
Returns the left flags, but with all the right flags toggled.
impl BitAndAssign<DataAccessFlags> for DataAccessFlags
fn bitand_assign(&mut self, other: DataAccessFlags)
Disables all flags disabled in the set.
impl BitOrAssign<DataAccessFlags> for DataAccessFlags
fn bitor_assign(&mut self, other: DataAccessFlags)
Adds the set of flags.
impl BitXorAssign<DataAccessFlags> for DataAccessFlags
fn bitxor_assign(&mut self, other: DataAccessFlags)
Toggles the set of flags.
impl Hash for DataAccessFlags
fn hash<__H: Hasher>(&self, state: &mut __H)
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl FromIterator<DataAccessFlags> for DataAccessFlags
fn from_iter<T: IntoIterator<Item = DataAccessFlags>>(
iterator: T
) -> DataAccessFlags
iterator: T
) -> DataAccessFlags
impl Octal for DataAccessFlags
impl Binary for DataAccessFlags
impl LowerHex for DataAccessFlags
impl UpperHex for DataAccessFlags
Auto Trait Implementations
impl Unpin for DataAccessFlags
impl Sync for DataAccessFlags
impl Send for DataAccessFlags
impl RefUnwindSafe for DataAccessFlags
impl UnwindSafe for DataAccessFlags
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,