pub struct IRGraph {
pub module: Module,
}Expand description
A container for the AIRL IR module graph.
Provides convenience methods for loading and saving IR modules.
Fields§
§module: ModuleThe contained module.
Implementations§
Source§impl IRGraph
impl IRGraph
Sourcepub fn from_json(json: &str) -> Result<Self, IRGraphError>
pub fn from_json(json: &str) -> Result<Self, IRGraphError>
Parse an IR graph from a JSON string.
Sourcepub fn to_json(&self) -> Result<String, IRGraphError>
pub fn to_json(&self) -> Result<String, IRGraphError>
Serialize the IR graph to a pretty-printed JSON string.
Sourcepub fn to_json_compact(&self) -> Result<String, IRGraphError>
pub fn to_json_compact(&self) -> Result<String, IRGraphError>
Serialize the IR graph to a compact JSON string.
Sourcepub fn module_mut(&mut self) -> &mut Module
pub fn module_mut(&mut self) -> &mut Module
Get a mutable reference to the underlying module.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IRGraph
impl RefUnwindSafe for IRGraph
impl Send for IRGraph
impl Sync for IRGraph
impl Unpin for IRGraph
impl UnsafeUnpin for IRGraph
impl UnwindSafe for IRGraph
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