pub struct AssetDaemon {
pub db_dir: PathBuf,
pub address: SocketAddr,
pub importers: ImporterMap,
pub importer_contexts: Vec<Box<dyn ImporterContext>>,
pub asset_dirs: Vec<PathBuf>,
}Fields§
§db_dir: PathBuf§address: SocketAddr§importers: ImporterMap§importer_contexts: Vec<Box<dyn ImporterContext>>§asset_dirs: Vec<PathBuf>Implementations§
Source§impl AssetDaemon
impl AssetDaemon
pub fn with_db_path<P: AsRef<Path>>(self, path: P) -> Self
pub fn with_address(self, address: SocketAddr) -> Self
pub fn with_importer<B>(self, ext: &str, importer: B) -> Selfwhere
B: BoxedImporter + 'static,
pub fn add_importer<B>(&mut self, ext: &str, importer: B)where
B: BoxedImporter + 'static,
pub fn with_importers<B, I>(self, importers: I) -> Self
pub fn with_importers_boxed<I>(self, importers: I) -> Self
pub fn add_importers<B, I>(&mut self, importers: I)
pub fn with_importer_context(self, context: Box<dyn ImporterContext>) -> Self
pub fn with_importer_contexts<I>(self, contexts: I) -> Self
pub fn with_asset_dirs(self, dirs: Vec<PathBuf>) -> Self
pub fn run(self) -> (JoinHandle<()>, Sender<bool>)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AssetDaemon
impl !RefUnwindSafe for AssetDaemon
impl Send for AssetDaemon
impl Sync for AssetDaemon
impl Unpin for AssetDaemon
impl !UnwindSafe for AssetDaemon
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