pub(crate) enum DirectiveKind {
Diagnostic,
Enable,
Requires,
}
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.
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
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<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.