pub enum Nodes<'a> {
Show 24 variants
Null,
Scope {
name: &'a str,
children: Vec<Node<'a>>,
},
Struct {
name: &'a str,
fields: Vec<Node<'a>>,
},
Member {
name: &'a str,
type: String,
},
Function {
name: &'a str,
params: Vec<Node<'a>>,
return_type: &'a str,
statements: Vec<Node<'a>>,
},
Conditional {
condition: Box<Node<'a>>,
statements: Vec<Node<'a>>,
},
ForLoop {
initializer: Box<Node<'a>>,
condition: Box<Node<'a>>,
update: Box<Node<'a>>,
statements: Vec<Node<'a>>,
},
Binding {
name: &'a str,
type: Box<Node<'a>>,
slot: u32,
read: bool,
write: bool,
count: Option<NonZeroUsize>,
},
Descriptor {
name: &'a str,
resource_type: &'a str,
format: Option<&'a str>,
slot: u32,
read: bool,
write: bool,
count: Option<NonZeroU32>,
},
Specialization {
name: &'a str,
type: &'a str,
},
PushConstant {
members: Vec<Node<'a>>,
},
Type {
name: &'a str,
members: Vec<Node<'a>>,
},
Image {
format: &'a str,
},
CombinedImageSampler {
format: &'a str,
},
Expression(Expressions<'a>),
RawCode {
glsl: Option<Cow<'a, str>>,
hlsl: Option<Cow<'a, str>>,
msl: Option<Cow<'a, str>>,
input: &'a [&'a str],
output: &'a [&'a str],
},
Intrinsic {
name: &'a str,
elements: Vec<Node<'a>>,
return: &'a str,
},
Input {
name: &'a str,
format: &'a str,
location: u8,
},
Output {
name: &'a str,
format: &'a str,
location: u8,
count: Option<NonZeroUsize>,
},
TaskPayload {
name: &'a str,
format: &'a str,
count: NonZeroUsize,
},
Workgroup {
name: &'a str,
format: &'a str,
},
Literal {
name: &'a str,
body: Box<Node<'a>>,
},
Parameter {
name: &'a str,
type: &'a str,
},
Const {
name: &'a str,
type: TypeName<'a>,
value: Box<Node<'a>>,
},
}Variants§
Null
A placeholder for syntax that does not yet have a specialized node.
Scope
A named group of BESL declarations, similar to a Rust module.
Struct
A struct declaration and its fields.
Member
A field declared in a struct.
Function
A function declaration and body.
Conditional
ForLoop
Fields
Binding
A shader resource binding declaration.
Fields
§
count: Option<NonZeroUsize>Descriptor
A flat resource descriptor declared directly in BESL source.
Fields
§
count: Option<NonZeroU32>Specialization
A constant selected when the application creates a pipeline.
PushConstant
A small constant buffer updated during rendering.
Type
An abstract type declaration, such as the declaration for f32.
Image
CombinedImageSampler
Expression(Expressions<'a>)
RawCode
Fields
Intrinsic
Input
Output
TaskPayload
An array carried from a task shader invocation group to the mesh work it emits.
Workgroup
Storage shared by all invocations in one task or compute workgroup.
Literal
Parameter
Const
A named module-level value known at compile time.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Nodes<'a>
impl<'a> RefUnwindSafe for Nodes<'a>
impl<'a> Send for Nodes<'a>
impl<'a> Sync for Nodes<'a>
impl<'a> Unpin for Nodes<'a>
impl<'a> UnsafeUnpin for Nodes<'a>
impl<'a> UnwindSafe for Nodes<'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