pub struct FileContentProvider<T> { /* private fields */ }
Implementations§
Source§impl<T> FileContentProvider<T>
impl<T> FileContentProvider<T>
pub fn new( extension: impl ToString, parser: impl BytesContentParser<T> + 'static, ) -> Self
Trait Implementations§
Source§impl<T> ScriptContentProvider<T> for FileContentProvider<T>
impl<T> ScriptContentProvider<T> for FileContentProvider<T>
fn load(&mut self, path: &str) -> Result<Option<T>, Box<dyn Error>>
fn sanitize_path(&self, path: &str) -> Result<String, Box<dyn Error>>
fn join_paths( &self, parent: &str, relative: &str, ) -> Result<String, Box<dyn Error>>
fn unpack_load( &mut self, path: &str, ) -> Result<Vec<ScriptContent<T>>, Box<dyn Error>>
Auto Trait Implementations§
impl<T> Freeze for FileContentProvider<T>
impl<T> !RefUnwindSafe for FileContentProvider<T>
impl<T> !Send for FileContentProvider<T>
impl<T> !Sync for FileContentProvider<T>
impl<T> Unpin for FileContentProvider<T>
impl<T> !UnwindSafe for FileContentProvider<T>
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