[−][src]Struct gluon::import::Import
Macro which rewrites occurances of import! "filename"
to a load of that file if it is not
already loaded and then a global access to the loaded module
Fields
paths: RwLock<Vec<PathBuf>>
importer: I
compiler: Mutex<CompilerDatabase>
Implementations
impl<I> Import<I>
[src]
pub fn new(importer: I) -> Import<I>
[src]
Creates a new import macro
pub fn add_path<P: Into<PathBuf>>(&self, path: P)
[src]
Adds a path to the list of paths which the importer uses to find files
pub fn set_paths(&self, paths: Vec<PathBuf>)
[src]
pub fn modules(&self, compiler: &mut ModuleCompiler) -> Vec<Cow<'static, str>>
[src]
pub fn database_mut(self: Arc<Self>, thread: RootedThread) -> DatabaseMut where
I: Importer,
[src]
I: Importer,
pub fn snapshot(&self, thread: RootedThread) -> DatabaseSnapshot
[src]
pub fn fork(
&self,
forker: ForkState<CompilerDatabase>,
thread: RootedThread
) -> DatabaseFork
[src]
&self,
forker: ForkState<CompilerDatabase>,
thread: RootedThread
) -> DatabaseFork
Trait Implementations
impl<I> Macro for Import<I> where
I: Importer,
[src]
I: Importer,
fn get_capability_impl(
&self,
thread: &Thread,
arc_self: &Arc<dyn Macro>,
id: TypeId
) -> Option<Box<dyn Any>>
[src]
&self,
thread: &Thread,
arc_self: &Arc<dyn Macro>,
id: TypeId
) -> Option<Box<dyn Any>>
fn expand<'r, 'a: 'r, 'b: 'r, 'ast: 'r>(
&self,
macros: &'b mut MacroExpander<'a>,
_arena: &'b mut OwnedArena<'ast, Symbol>,
args: &'b mut [SpannedExpr<'ast, Symbol>]
) -> MacroFuture<'r, 'ast>
[src]
&self,
macros: &'b mut MacroExpander<'a>,
_arena: &'b mut OwnedArena<'ast, Symbol>,
args: &'b mut [SpannedExpr<'ast, Symbol>]
) -> MacroFuture<'r, 'ast>
fn get_capability<T>(
&self,
thread: &Thread,
arc_self: &Arc<dyn Macro + 'static>
) -> Option<T> where
T: Any,
[src]
&self,
thread: &Thread,
arc_self: &Arc<dyn Macro + 'static>
) -> Option<T> where
T: Any,
impl<I> Trace for Import<I>
[src]
Auto Trait Implementations
impl<I> RefUnwindSafe for Import<I> where
I: RefUnwindSafe,
I: RefUnwindSafe,
impl<I> Send for Import<I> where
I: Send,
I: Send,
impl<I> Sync for Import<I> where
I: Sync,
I: Sync,
impl<I> Unpin for Import<I> where
I: Unpin,
I: Unpin,
impl<I> UnwindSafe for Import<I> where
I: UnwindSafe,
I: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<'_, T> Captures<'_> for T
[src]
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
type Remainder = Choices
fn subset(
self
) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>
self
) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastArc for T where
T: Downcast + Send + Sync,
[src]
T: Downcast + Send + Sync,
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<D, T> FromPtr<D> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U, I> LiftInto<U, I> for T where
U: LiftFrom<T, I>,
U: LiftFrom<T, I>,
fn lift_into(self) -> U
impl<Source> Sculptor<HNil, HNil> for Source
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,