pub struct Module(pub Index);
Tuple Fields§
§0: Index
Implementations§
source§impl Module
impl Module
sourcepub fn new(context: &mut Context, kind: Kind) -> Module
pub fn new(context: &mut Context, kind: Kind) -> Module
Return a new module of a specific kind.
sourcepub fn function_iter(&self, context: &Context) -> FunctionIterator ⓘ
pub fn function_iter(&self, context: &Context) -> FunctionIterator ⓘ
Return an interator over each of the Function
s in this module.
sourcepub fn add_global_constant(
&self,
context: &mut Context,
name: String,
const_val: Value
)
pub fn add_global_constant(
&self,
context: &mut Context,
name: String,
const_val: Value
)
Add a global constant value to this module.
sourcepub fn get_global_constant(&self, context: &Context, name: &str) -> Option<Value>
pub fn get_global_constant(&self, context: &Context, name: &str) -> Option<Value>
Get a named global constant value from this module, if found.
sourcepub fn add_global_configurable(
&self,
context: &mut Context,
name: String,
config_val: Value
)
pub fn add_global_configurable(
&self,
context: &mut Context,
name: String,
config_val: Value
)
Add a global configurable value to this module.
sourcepub fn get_global_configurable(
&self,
context: &Context,
name: &str
) -> Option<Value>
pub fn get_global_configurable(
&self,
context: &Context,
name: &str
) -> Option<Value>
Get a named global configurable value from this module, if found.
sourcepub fn remove_function(&self, context: &mut Context, function: &Function)
pub fn remove_function(&self, context: &mut Context, function: &Function)
Removed a function from the module. Returns true if function was found and removed.
Use with care! Be sure the function is not an entry point nor called at any stage.
Trait Implementations§
source§impl PartialEq<Module> for Module
impl PartialEq<Module> for Module
impl Copy for Module
impl Eq for Module
impl StructuralEq for Module
impl StructuralPartialEq for Module
Auto Trait Implementations§
impl RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnwindSafe for Module
Blanket Implementations§
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more