Struct wrapped_mono::domain::Domain
source · pub struct Domain { /* private fields */ }
Expand description
Safe representation of [MonoDomain
] type.
Implementations§
source§impl Domain
impl Domain
sourcepub fn assembly_open(&self, path: &str) -> Option<Assembly>
pub fn assembly_open(&self, path: &str) -> Option<Assembly>
sourcepub fn create() -> Self
pub fn create() -> Self
Creates a new empty domain
Example
let domain1 = jit::init("name",None);
let domain2 = Domain::create();
sourcepub fn set_config(&self, base_directory: &str, filename: &str)
pub fn set_config(&self, base_directory: &str, filename: &str)
Sets domain confing to one loaded from file filename in directory base_directory
.
sourcepub fn attach_thread(&self)
pub fn attach_thread(&self)
Attaches current thread (makes domain “aware” of this threads existence, allowing domain to eg. automatically stop it during garbage collection to prevent errors.) Should be done for all threads that will interact with this domain.
sourcepub fn get_current() -> Option<Self>
pub fn get_current() -> Option<Self>
Returns current domain or None
if mono runtime is not initialized yet.
Trait Implementations§
source§impl PartialEq<Domain> for Domain
impl PartialEq<Domain> for Domain
impl Copy for Domain
impl Eq for Domain
impl StructuralEq for Domain
impl Sync for Domain
Auto Trait Implementations§
impl RefUnwindSafe for Domain
impl !Send for Domain
impl Unpin for Domain
impl UnwindSafe for Domain
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