[−][src]Struct jlrs::module::Module
Functionality in Julia can be accessed through its module system. You can get a handle to the
three standard modules, Main
, Base
, and Core
and access their submodules through them.
If you include your own Julia code with Julia::include
, its contents are made available
relative to Main
.
Methods
impl<'scope> Module<'scope>
[src]
pub fn main<'base: 'frame, 'frame, F: Frame<'base, 'frame>>(
_: &mut F
) -> Module<'base>
[src]
_: &mut F
) -> Module<'base>
Returns a handle to Julia's Main
-module. If you include your own Julia code by calling
Julia::include
, handles to functions, globals, and submodules defined in these
included files are available through this module.
pub fn core<'base: 'frame, 'frame, F: Frame<'base, 'frame>>(
_: &mut F
) -> Module<'base>
[src]
_: &mut F
) -> Module<'base>
Returns a handle to Julia's Core
-module.
pub fn base<'base: 'frame, 'frame, F: Frame<'base, 'frame>>(
_: &mut F
) -> Module<'base>
[src]
_: &mut F
) -> Module<'base>
Returns a handle to Julia's Base
-module.
pub fn submodule<N: AsRef<str>>(self, name: N) -> JlrsResult<Self>
[src]
Returns the submodule named name
relative to this module. You have to visit this level
by level: you can't access Main.A.B
by calling this function with "A.B"
, but have to
access A
first and then B
.
Returns an error if the submodule doesn't exist.
pub fn global<N: AsRef<str>>(
self,
name: N
) -> JlrsResult<Value<'scope, 'static>>
[src]
self,
name: N
) -> JlrsResult<Value<'scope, 'static>>
Returns the global named name
in this module.
Returns an error if the global doesn't exist.
pub fn function<N: AsRef<str>>(
self,
name: N
) -> JlrsResult<Value<'scope, 'static>>
[src]
self,
name: N
) -> JlrsResult<Value<'scope, 'static>>
Returns the function named name
in this module. Note that all globals defined within the
module will be successfully resolved into a function; Julia will throw an exception if you
try to call something that isn't a function. This means that this method is just an alias
for Module::global
.
Returns an error if th function doesn't exist.
Trait Implementations
Auto Trait Implementations
impl<'scope> RefUnwindSafe for Module<'scope>
impl<'scope> !Send for Module<'scope>
impl<'scope> !Sync for Module<'scope>
impl<'scope> Unpin for Module<'scope>
impl<'scope> UnwindSafe for Module<'scope>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,