#[repr(transparent)]pub struct UsageHint(<UsageHint as PublicFlags>::Internal);
Expand description
Gives the driver a hint of intended usage to optimize allocation (e.g. tiling).
Tuple Fields
0: <UsageHint as PublicFlags>::Internal
Implementations
sourceimpl UsageHint
impl UsageHint
sourcepub const USAGE_HINT_GENERIC: Self = _
pub const USAGE_HINT_GENERIC: Self = _
Surface usage not indicated.
sourcepub const USAGE_HINT_DECODER: Self = _
pub const USAGE_HINT_DECODER: Self = _
Surface used by video decoder.
sourcepub const USAGE_HINT_ENCODER: Self = _
pub const USAGE_HINT_ENCODER: Self = _
Surface used by video encoder.
sourcepub const USAGE_HINT_VPP_READ: Self = _
pub const USAGE_HINT_VPP_READ: Self = _
Surface read by video post-processing.
sourcepub const USAGE_HINT_VPP_WRITE: Self = _
pub const USAGE_HINT_VPP_WRITE: Self = _
Surface written by video post-processing.
sourcepub const USAGE_HINT_DISPLAY: Self = _
pub const USAGE_HINT_DISPLAY: Self = _
Surface used for display.
sourcepub const USAGE_HINT_EXPORT: Self = _
pub const USAGE_HINT_EXPORT: Self = _
Surface used for export to third-party APIs, e.g. via vaExportSurfaceHandle()
.
Trait Implementations
sourceimpl BitAndAssign<UsageHint> for UsageHint
impl BitAndAssign<UsageHint> for UsageHint
sourcefn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
Disables all flags disabled in the set.
sourceimpl BitFlags for UsageHint
impl BitFlags for UsageHint
type Iter = Iter
type Iter = Iter
An iterator over enabled flags in an instance of the type.
type IterNames = IterRaw
type IterNames = IterRaw
An iterator over the raw names and bits for enabled flags in an instance of the type.
sourcefn from_bits(bits: u32) -> Option<UsageHint>
fn from_bits(bits: u32) -> Option<UsageHint>
Convert from underlying bit representation, unless that
representation contains bits that do not correspond to a flag. Read more
sourcefn from_bits_truncate(bits: u32) -> UsageHint
fn from_bits_truncate(bits: u32) -> UsageHint
Convert from underlying bit representation, dropping any bits
that do not correspond to flags. Read more
sourcefn from_bits_retain(bits: u32) -> UsageHint
fn from_bits_retain(bits: u32) -> UsageHint
Convert from underlying bit representation, preserving all
bits (even those not corresponding to a defined flag). Read more
sourcefn iter_names(&self) -> Self::IterNames
fn iter_names(&self) -> Self::IterNames
Iterate over the raw names and bits for enabled flag values.
sourcefn intersects(&self, other: UsageHint) -> bool
fn intersects(&self, other: UsageHint) -> bool
Returns
true
if there are flags common to both self
and other
.sourceimpl BitOrAssign<UsageHint> for UsageHint
impl BitOrAssign<UsageHint> for UsageHint
sourcefn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
Adds the set of flags.
sourceimpl BitXorAssign<UsageHint> for UsageHint
impl BitXorAssign<UsageHint> for UsageHint
sourcefn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
Toggles the set of flags.
sourceimpl Extend<UsageHint> for UsageHint
impl Extend<UsageHint> for UsageHint
sourcefn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl FromIterator<UsageHint> for UsageHint
impl FromIterator<UsageHint> for UsageHint
sourcefn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
Creates a value from an iterator. Read more
sourceimpl IntoIterator for UsageHint
impl IntoIterator for UsageHint
sourceimpl Ord for UsageHint
impl Ord for UsageHint
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<UsageHint> for UsageHint
impl PartialOrd<UsageHint> for UsageHint
sourcefn partial_cmp(&self, other: &UsageHint) -> Option<Ordering>
fn partial_cmp(&self, other: &UsageHint) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl PublicFlags for UsageHint
impl PublicFlags for UsageHint
type Internal = InternalBitFlags
type Internal = InternalBitFlags
The type of the internal field on the generated flags type.
sourceimpl SubAssign<UsageHint> for UsageHint
impl SubAssign<UsageHint> for UsageHint
sourcefn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Disables all flags enabled in the set.
impl Copy for UsageHint
impl Eq for UsageHint
impl StructuralEq for UsageHint
impl StructuralPartialEq for UsageHint
Auto Trait Implementations
impl RefUnwindSafe for UsageHint
impl Send for UsageHint
impl Sync for UsageHint
impl Unpin for UsageHint
impl UnwindSafe for UsageHint
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more