pub struct ShaderIncludeResolver {
pub virtual_fs: HashMap<String, String>,
pub include_paths: Vec<String>,
pub resolved_cache: HashMap<String, String>,
pub max_size_bytes: usize,
}Fields§
§virtual_fs: HashMap<String, String>§include_paths: Vec<String>§resolved_cache: HashMap<String, String>§max_size_bytes: usizeImplementations§
Source§impl ShaderIncludeResolver
impl ShaderIncludeResolver
pub fn new() -> Self
pub fn register_virtual( &mut self, path: impl Into<String>, content: impl Into<String>, )
pub fn add_include_path(&mut self, path: impl Into<String>)
pub fn resolve(&self, include_path: &str) -> Option<&str>
pub fn cache_result(&mut self, include_path: String, content: String)
pub fn clear_cache(&mut self)
pub fn virtual_file_count(&self) -> usize
Trait Implementations§
Source§impl Clone for ShaderIncludeResolver
impl Clone for ShaderIncludeResolver
Source§impl Debug for ShaderIncludeResolver
impl Debug for ShaderIncludeResolver
Auto Trait Implementations§
impl Freeze for ShaderIncludeResolver
impl RefUnwindSafe for ShaderIncludeResolver
impl Send for ShaderIncludeResolver
impl Sync for ShaderIncludeResolver
impl Unpin for ShaderIncludeResolver
impl UnsafeUnpin for ShaderIncludeResolver
impl UnwindSafe for ShaderIncludeResolver
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.