makepad_shader_compiler::shader_ast

Type Alias Ty

Source
pub type Ty = ShaderTy;

Aliased Type§

enum Ty {
Show 23 variants Void, Bool, Int, Float, Bvec2, Bvec3, Bvec4, Ivec2, Ivec3, Ivec4, Vec2, Vec3, Vec4, Mat2, Mat3, Mat4, Texture2D, Array { elem_ty: Rc<ShaderTy>, len: usize, }, Struct(StructPtr), Enum(TypeId), DrawShader(DrawShaderPtr), ClosureDef(ClosureDefIndex), ClosureDecl,
}

Variants§

§

Void

§

Bool

§

Int

§

Float

§

Bvec2

§

Bvec3

§

Bvec4

§

Ivec2

§

Ivec3

§

Ivec4

§

Vec2

§

Vec3

§

Vec4

§

Mat2

§

Mat3

§

Mat4

§

Texture2D

§

Array

Fields

§elem_ty: Rc<ShaderTy>
§len: usize
§

Struct(StructPtr)

§

Enum(TypeId)

§

DrawShader(DrawShaderPtr)

§

ClosureDef(ClosureDefIndex)

§

ClosureDecl

Implementations§

Source§

impl Ty

Source

pub fn maybe_ty_lit(&self) -> Option<TyLit>

Source

pub fn is_scalar(&self) -> bool

Source

pub fn is_vector(&self) -> bool

Source

pub fn is_matrix(&self) -> bool

Source

pub fn slots(&self) -> usize

Source

pub fn to_ty_expr(&self) -> TyExpr

Source

pub fn from_live_eval(live_eval: LiveEval) -> Option<Self>

Source

pub fn from_live_node( live_registry: &LiveRegistry, index: usize, nodes: &[LiveNode], ) -> Result<Self, LiveError>

Trait Implementations§

Source§

impl Display for Ty

Source§

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

Formats the value using the given formatter. Read more