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

Fields§

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

Implementations§

§

impl ShaderRegistry

pub fn new() -> ShaderRegistry

§

impl ShaderRegistry

pub fn flush_registry(&mut self)

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

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

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

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

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

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

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

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

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

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

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

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, TypeId, &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.