Enum naga::front::wgsl::parse::directive::enable_extension::EnableExtension
source · pub enum EnableExtension {
Implemented(ImplementedEnableExtension),
Unimplemented(UnimplementedEnableExtension),
}
Expand description
An enable-extension not guaranteed to be present in all environments.
WGSL spec.: https://www.w3.org/TR/WGSL/#enable-extensions-sec
Variants§
Implemented(ImplementedEnableExtension)
Unimplemented(UnimplementedEnableExtension)
Implementations§
source§impl EnableExtension
impl EnableExtension
const F16: &'static str = "f16"
const CLIP_DISTANCES: &'static str = "clip_distances"
const DUAL_SOURCE_BLENDING: &'static str = "dual_source_blending"
sourcepub(crate) fn from_ident(word: &str, span: Span) -> Result<Self, Error<'_>>
pub(crate) fn from_ident(word: &str, span: Span) -> Result<Self, Error<'_>>
Convert from a sentinel word in WGSL into its associated EnableExtension
, if possible.
sourcepub const fn to_ident(self) -> &'static str
pub const fn to_ident(self) -> &'static str
Maps this EnableExtension
into the sentinel word associated with it in WGSL.
Trait Implementations§
source§impl Clone for EnableExtension
impl Clone for EnableExtension
source§fn clone(&self) -> EnableExtension
fn clone(&self) -> EnableExtension
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for EnableExtension
impl Debug for EnableExtension
source§impl Hash for EnableExtension
impl Hash for EnableExtension
source§impl PartialEq for EnableExtension
impl PartialEq for EnableExtension
source§fn eq(&self, other: &EnableExtension) -> bool
fn eq(&self, other: &EnableExtension) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for EnableExtension
impl Eq for EnableExtension
impl StructuralPartialEq for EnableExtension
Auto Trait Implementations§
impl Freeze for EnableExtension
impl RefUnwindSafe for EnableExtension
impl Send for EnableExtension
impl Sync for EnableExtension
impl Unpin for EnableExtension
impl UnwindSafe for EnableExtension
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.