Struct TextureUsage
pub struct TextureUsage { /* private fields */ }Expand description
A set of flags describing the allowed usages of a TextureId.
Implementations§
§impl TextureUsage
impl TextureUsage
pub const EMPTY: TextureUsage
pub const EMPTY: TextureUsage
An empty set of flags.
pub const COPY_SRC: TextureUsage
pub const COPY_SRC: TextureUsage
The texture can be used as the source of a copy operation.
pub const COPY_DST: TextureUsage
pub const COPY_DST: TextureUsage
The texture can be used as the destination of a copy operation.
pub const TEXTURE_BINDING: TextureUsage
pub const TEXTURE_BINDING: TextureUsage
The texture can be bound in a shader for sampling (reading).
pub const STORAGE_BINDING: TextureUsage
pub const STORAGE_BINDING: TextureUsage
The texture can be used as a storage texture (read/write access from shaders).
pub const RENDER_ATTACHMENT: TextureUsage
pub const RENDER_ATTACHMENT: TextureUsage
The texture can be used as a color or multisample resolve attachment in a render pass.
pub const DEPTH_STENCIL_ATTACHMENT: TextureUsage
pub const DEPTH_STENCIL_ATTACHMENT: TextureUsage
The texture can be used as a depth/stencil target (for render attachments).
pub const fn from_bits_truncate(bits: u32) -> TextureUsage
pub const fn from_bits_truncate(bits: u32) -> TextureUsage
Creates a new bitflag set from the given raw bits. Bits not corresponding to any defined flag are kept.
pub const fn contains(&self, other: TextureUsage) -> bool
pub const fn contains(&self, other: TextureUsage) -> bool
Returns true if all flags in other are contained within self.
pub const fn intersects(&self, other: TextureUsage) -> bool
pub const fn intersects(&self, other: TextureUsage) -> bool
Returns true if any flag in other is contained within self.
pub fn insert(&mut self, other: TextureUsage)
pub fn insert(&mut self, other: TextureUsage)
Inserts the flags in other into self.
pub fn remove(&mut self, other: TextureUsage)
pub fn remove(&mut self, other: TextureUsage)
Removes the flags in other from self.
pub fn toggle(&mut self, other: TextureUsage)
pub fn toggle(&mut self, other: TextureUsage)
Toggles the flags in other in self.
pub const fn with(self, other: TextureUsage) -> TextureUsage
pub const fn with(self, other: TextureUsage) -> TextureUsage
Returns a new Self with other flags inserted.
pub const fn without(self, other: TextureUsage) -> TextureUsage
pub const fn without(self, other: TextureUsage) -> TextureUsage
Returns a new Self with other flags removed.
Trait Implementations§
§impl BitAnd for TextureUsage
impl BitAnd for TextureUsage
§type Output = TextureUsage
type Output = TextureUsage
& operator.§fn bitand(self, other: TextureUsage) -> TextureUsage
fn bitand(self, other: TextureUsage) -> TextureUsage
& operation. Read more§impl BitAndAssign for TextureUsage
impl BitAndAssign for TextureUsage
§fn bitand_assign(&mut self, other: TextureUsage)
fn bitand_assign(&mut self, other: TextureUsage)
&= operation. Read more§impl BitOr for TextureUsage
impl BitOr for TextureUsage
§type Output = TextureUsage
type Output = TextureUsage
| operator.§fn bitor(self, other: TextureUsage) -> TextureUsage
fn bitor(self, other: TextureUsage) -> TextureUsage
| operation. Read more§impl BitOrAssign for TextureUsage
impl BitOrAssign for TextureUsage
§fn bitor_assign(&mut self, other: TextureUsage)
fn bitor_assign(&mut self, other: TextureUsage)
|= operation. Read more§impl BitXor for TextureUsage
impl BitXor for TextureUsage
§type Output = TextureUsage
type Output = TextureUsage
^ operator.§fn bitxor(self, other: TextureUsage) -> TextureUsage
fn bitxor(self, other: TextureUsage) -> TextureUsage
^ operation. Read more§impl BitXorAssign for TextureUsage
impl BitXorAssign for TextureUsage
§fn bitxor_assign(&mut self, other: TextureUsage)
fn bitxor_assign(&mut self, other: TextureUsage)
^= operation. Read more§impl Clone for TextureUsage
impl Clone for TextureUsage
§fn clone(&self) -> TextureUsage
fn clone(&self) -> TextureUsage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for TextureUsage
impl Debug for TextureUsage
§impl Default for TextureUsage
impl Default for TextureUsage
§fn default() -> TextureUsage
fn default() -> TextureUsage
§impl Hash for TextureUsage
impl Hash for TextureUsage
§impl Not for TextureUsage
impl Not for TextureUsage
§type Output = TextureUsage
type Output = TextureUsage
! operator.§fn not(self) -> TextureUsage
fn not(self) -> TextureUsage
! operation. Read more§impl PartialEq for TextureUsage
impl PartialEq for TextureUsage
impl Copy for TextureUsage
impl Eq for TextureUsage
impl StructuralPartialEq for TextureUsage
Auto Trait Implementations§
impl Freeze for TextureUsage
impl RefUnwindSafe for TextureUsage
impl Send for TextureUsage
impl Sync for TextureUsage
impl Unpin for TextureUsage
impl UnsafeUnpin for TextureUsage
impl UnwindSafe for TextureUsage
Blanket Implementations§
§impl<T> AppLifecycle for Twhere
T: ?Sized,
impl<T> AppLifecycle for Twhere
T: ?Sized,
§fn on_start(&mut self, ctx: &mut dyn AppContext)
fn on_start(&mut self, ctx: &mut dyn AppContext)
update. Apps install their theme / fonts here.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().§impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.