Struct melior_next::ContextRef
source · pub struct ContextRef<'a> { /* private fields */ }
Expand description
A reference to a context.
Methods from Deref<Target = Context>§
sourcepub fn registered_dialect_count(&self) -> usize
pub fn registered_dialect_count(&self) -> usize
Gets a number of registered dialects.
sourcepub fn loaded_dialect_count(&self) -> usize
pub fn loaded_dialect_count(&self) -> usize
Gets a number of loaded dialects.
sourcepub fn get_or_load_dialect(&self, name: &str) -> Dialect<'_>
pub fn get_or_load_dialect(&self, name: &str) -> Dialect<'_>
Gets or loads a dialect.
sourcepub fn append_dialect_registry(&self, registry: &Registry)
pub fn append_dialect_registry(&self, registry: &Registry)
Appends a dialect registry.
sourcepub fn load_all_available_dialects(&self)
pub fn load_all_available_dialects(&self)
Loads all available dialects.
sourcepub fn enable_multi_threading(&self, enabled: bool)
pub fn enable_multi_threading(&self, enabled: bool)
Enables multi-threading.
sourcepub fn allow_unregistered_dialects(&self) -> bool
pub fn allow_unregistered_dialects(&self) -> bool
Returns true
if unregistered dialects are allowed.
sourcepub fn set_allow_unregistered_dialects(&self, allowed: bool)
pub fn set_allow_unregistered_dialects(&self, allowed: bool)
Set if unregistered dialects are allowed.
sourcepub fn is_registered_operation(&self, name: &str) -> bool
pub fn is_registered_operation(&self, name: &str) -> bool
Returns true
if a given operation is registered in a context.
sourcepub fn attach_diagnostic_handler<F>(&self, handler: F) -> DiagnosticHandlerwhere
F: FnMut(Diagnostic<'_>) -> LogicalResult,
pub fn attach_diagnostic_handler<F>(&self, handler: F) -> DiagnosticHandlerwhere F: FnMut(Diagnostic<'_>) -> LogicalResult,
Attach a diagnostic handler to the context.
pub fn detach_diagnostic_handler<F>(&self, handler: DiagnosticHandler)
Trait Implementations§
source§impl<'a> Clone for ContextRef<'a>
impl<'a> Clone for ContextRef<'a>
source§fn clone(&self) -> ContextRef<'a>
fn clone(&self) -> ContextRef<'a>
Returns a copy 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 more