pub(crate) enum DirectiveKind {
Enable,
Requires,
Unimplemented(UnimplementedDirectiveKind),
}
Expand description
A parsed sentinel word indicating the type of directive to be parsed next.
Variants§
Implementations§
source§impl DirectiveKind
impl DirectiveKind
const DIAGNOSTIC: &'static str = "diagnostic"
const ENABLE: &'static str = "enable"
const REQUIRES: &'static str = "requires"
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 DirectiveKind
, if possible.
sourcepub const fn to_ident(self) -> &'static str
pub const fn to_ident(self) -> &'static str
Maps this DirectiveKind
into the sentinel word associated with it in WGSL.
Trait Implementations§
source§impl Clone for DirectiveKind
impl Clone for DirectiveKind
source§fn clone(&self) -> DirectiveKind
fn clone(&self) -> DirectiveKind
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 DirectiveKind
impl Debug for DirectiveKind
source§impl Hash for DirectiveKind
impl Hash for DirectiveKind
source§impl PartialEq for DirectiveKind
impl PartialEq for DirectiveKind
source§fn eq(&self, other: &DirectiveKind) -> bool
fn eq(&self, other: &DirectiveKind) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for DirectiveKind
impl Eq for DirectiveKind
impl StructuralPartialEq for DirectiveKind
Auto Trait Implementations§
impl Freeze for DirectiveKind
impl RefUnwindSafe for DirectiveKind
impl Send for DirectiveKind
impl Sync for DirectiveKind
impl Unpin for DirectiveKind
impl UnwindSafe for DirectiveKind
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.