pub struct ImportContext<'a> {
pub path: &'a Path,
pub schema_set: &'a SchemaSet,
/* private fields */
}
Fields§
§path: &'a Path
§schema_set: &'a SchemaSet
Implementations§
Source§impl<'a> ImportContext<'a>
impl<'a> ImportContext<'a>
pub fn new( path: &'a Path, importable_assets: &'a HashMap<ImportableName, ImportableAsset>, schema_set: &'a SchemaSet, project_config: &'a HydrateProjectConfiguration, imported_importables: &'a mut HashMap<ImportableName, ImportedImportable>, log_events: &'a mut Vec<ImportLogEvent>, ) -> ImportContext<'a>
pub fn warn<T: Into<String>>(&self, message: T)
pub fn error<T: Into<String>>(&self, message: T)
pub fn add_importable( &self, name: ImportableName, asset: SingleObject, import_data: Option<SingleObject>, )
pub fn add_default_importable( &self, asset: SingleObject, import_data: Option<SingleObject>, )
pub fn should_import(&self, name: &ImportableName) -> bool
pub fn asset_id_for_importable(&self, name: &ImportableName) -> Option<AssetId>
pub fn canonical_path_for_referenced_file_path( &self, name: ImportableName, path: &PathReference, ) -> PipelineResult<&CanonicalPathReference>
pub fn asset_id_for_referenced_file_path( &self, name: ImportableName, path: &PathReference, ) -> PipelineResult<AssetId>
Trait Implementations§
Source§impl<'a> Clone for ImportContext<'a>
impl<'a> Clone for ImportContext<'a>
Source§fn clone(&self) -> ImportContext<'a>
fn clone(&self) -> ImportContext<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a> Freeze for ImportContext<'a>
impl<'a> !RefUnwindSafe for ImportContext<'a>
impl<'a> !Send for ImportContext<'a>
impl<'a> !Sync for ImportContext<'a>
impl<'a> Unpin for ImportContext<'a>
impl<'a> !UnwindSafe for ImportContext<'a>
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