naga::front::glsl::ast

Struct TypeQualifiers

source
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>

source

pub fn unused_errors(&self, errors: &mut Vec<Error>)

Appends errors with errors for all unused qualifiers

source

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

source

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>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> Default for TypeQualifiers<'a>

source§

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.