pub struct ShaderRegistry {
    pub all_fns: HashMap<FnPtr, FnDef>,
    pub draw_shader_defs: HashMap<DrawShaderPtr, DrawShaderDef>,
    pub structs: HashMap<StructPtr, StructDef>,
    pub builtins: HashMap<Ident, Builtin>,
    pub enums: HashMap<LiveType, ShaderEnum>,
}

Fields§

§all_fns: HashMap<FnPtr, FnDef>§draw_shader_defs: HashMap<DrawShaderPtr, DrawShaderDef>§structs: HashMap<StructPtr, StructDef>§builtins: HashMap<Ident, Builtin>§enums: HashMap<LiveType, ShaderEnum>

Implementations§

source§

impl ShaderRegistry

source

pub fn new() -> Self

source§

impl ShaderRegistry

source

pub fn flush_registry(&mut self)

source

pub fn register_enum(&mut self, live_type: LiveType, shader_enum: ShaderEnum)

source

pub fn compute_const_table( &self, draw_shader_ptr: DrawShaderPtr ) -> DrawShaderConstTable

source

pub fn fn_ident_from_ptr( &self, live_registry: &LiveRegistry, fn_node_ptr: FnPtr ) -> Ident

source

pub fn draw_shader_method_ptr_from_ident( &self, draw_shader_def: &DrawShaderDef, ident: Ident ) -> Option<FnPtr>

source

pub fn struct_method_ptr_from_ident( &self, struct_def: &StructDef, ident: Ident ) -> Option<FnPtr>

source

pub fn draw_shader_method_decl_from_ident( &self, draw_shader_def: &DrawShaderDef, ident: Ident ) -> Option<&FnDef>

source

pub fn struct_method_decl_from_ident( &self, struct_def: &StructDef, ident: Ident ) -> Option<&FnDef>

source

pub fn find_live_node_by_path( &self, live_registry: &LiveRegistry, base_ptr: LivePtr, ids: &[LiveId] ) -> LiveNodeFindResult

source

pub fn analyse_deps( &mut self, live_registry: &LiveRegistry, deps: &[ShaderParserDep] ) -> Result<(), LiveError>

source

pub fn analyse_plain_fn( &mut self, live_registry: &LiveRegistry, struct_ptr: Option<StructPtr>, fn_ptr: FnPtr ) -> Result<(), LiveError>

source

pub fn analyse_struct( &mut self, live_registry: &LiveRegistry, struct_ptr: StructPtr ) -> Result<(), LiveError>

source

pub fn analyse_draw_shader<F>( &mut self, live_registry: &LiveRegistry, draw_shader_ptr: DrawShaderPtr, ext_self: F ) -> Result<(), LiveError>where F: FnMut(&LiveRegistry, &ShaderRegistry, TokenSpan, DrawShaderQuery, LiveType, &mut DrawShaderDef),

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.