pub struct TypeQualifiers<'a> {
pub span: Span,
pub storage: (StorageQualifier, Span),
pub invariant: Option<Span>,
pub interpolation: Option<(Interpolation, Span)>,
pub precision: Option<(Precision, Span)>,
pub sampling: Option<(Sampling, Span)>,
pub storage_access: Option<(StorageAccess, Span)>,
pub layout_qualifiers: FastHashMap<QualifierKey<'a>, (QualifierValue, Span)>,
}
Fields§
§span: Span
§storage: (StorageQualifier, Span)
§invariant: Option<Span>
§interpolation: Option<(Interpolation, Span)>
§precision: Option<(Precision, Span)>
§sampling: Option<(Sampling, Span)>
§storage_access: Option<(StorageAccess, Span)>
Memory qualifiers used in the declaration to set the storage access to be used in declarations that support it (storage images and buffers)
layout_qualifiers: FastHashMap<QualifierKey<'a>, (QualifierValue, Span)>
Implementations§
source§impl<'a> TypeQualifiers<'a>
impl<'a> TypeQualifiers<'a>
sourcepub fn unused_errors(&self, errors: &mut Vec<Error>)
pub fn unused_errors(&self, errors: &mut Vec<Error>)
Appends errors
with errors for all unused qualifiers
sourcepub fn uint_layout_qualifier(
&mut self,
name: &'a str,
errors: &mut Vec<Error>,
) -> Option<u32>
pub fn uint_layout_qualifier( &mut self, name: &'a str, errors: &mut Vec<Error>, ) -> Option<u32>
Removes the layout qualifier with name
, if it exists and adds an error if it isn’t
a QualifierValue::Uint
sourcepub fn none_layout_qualifier(
&mut self,
name: &'a str,
errors: &mut Vec<Error>,
) -> bool
pub fn none_layout_qualifier( &mut self, name: &'a str, errors: &mut Vec<Error>, ) -> bool
Removes the layout qualifier with name
, if it exists and adds an error if it isn’t
a QualifierValue::None
Trait Implementations§
source§impl<'a> Debug for TypeQualifiers<'a>
impl<'a> Debug for TypeQualifiers<'a>
source§impl<'a> Default for TypeQualifiers<'a>
impl<'a> Default for TypeQualifiers<'a>
source§fn default() -> TypeQualifiers<'a>
fn default() -> TypeQualifiers<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for TypeQualifiers<'a>
impl<'a> RefUnwindSafe for TypeQualifiers<'a>
impl<'a> Send for TypeQualifiers<'a>
impl<'a> Sync for TypeQualifiers<'a>
impl<'a> Unpin for TypeQualifiers<'a>
impl<'a> UnwindSafe for TypeQualifiers<'a>
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