Enum naga::front::wgsl::parse::directive::language_extension::LanguageExtension
source · pub(crate) enum LanguageExtension {
Implemented(ImplementedLanguageExtension),
Unimplemented(UnimplementedLanguageExtension),
}
Expand description
A language extension not guaranteed to be present in all environments.
WGSL spec.: https://www.w3.org/TR/WGSL/#language-extensions-sec
Variants§
Implemented(ImplementedLanguageExtension)
Unimplemented(UnimplementedLanguageExtension)
Implementations§
source§impl LanguageExtension
impl LanguageExtension
const READONLY_AND_READWRITE_STORAGE_TEXTURES: &'static str = "readonly_and_readwrite_storage_textures"
const PACKED4X8_INTEGER_DOT_PRODUCT: &'static str = "packed_4x8_integer_dot_product"
const UNRESTRICTED_POINTER_PARAMETERS: &'static str = "unrestricted_pointer_parameters"
const POINTER_COMPOSITE_ACCESS: &'static str = "pointer_composite_access"
sourcepub fn from_ident(s: &str) -> Option<Self>
pub fn from_ident(s: &str) -> Option<Self>
Convert from a sentinel word in WGSL into its associated LanguageExtension
, if possible.
sourcepub const fn to_ident(self) -> &'static str
pub const fn to_ident(self) -> &'static str
Maps this LanguageExtension
into the sentinel word associated with it in WGSL.
Trait Implementations§
source§impl Clone for LanguageExtension
impl Clone for LanguageExtension
source§fn clone(&self) -> LanguageExtension
fn clone(&self) -> LanguageExtension
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 LanguageExtension
impl Debug for LanguageExtension
source§impl Hash for LanguageExtension
impl Hash for LanguageExtension
source§impl PartialEq for LanguageExtension
impl PartialEq for LanguageExtension
impl Copy for LanguageExtension
impl Eq for LanguageExtension
impl StructuralPartialEq for LanguageExtension
Auto Trait Implementations§
impl Freeze for LanguageExtension
impl RefUnwindSafe for LanguageExtension
impl Send for LanguageExtension
impl Sync for LanguageExtension
impl Unpin for LanguageExtension
impl UnwindSafe for LanguageExtension
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.