pub struct LirModule {
pub version: String,
pub doc_hash: String,
pub strings: Vec<String>,
pub types: Vec<LirType>,
pub cells: Vec<LirCell>,
pub tools: Vec<LirTool>,
pub policies: Vec<LirPolicy>,
pub agents: Vec<LirAgent>,
pub addons: Vec<LirAddon>,
pub effects: Vec<LirEffect>,
pub effect_binds: Vec<LirEffectBind>,
pub handlers: Vec<LirHandler>,
}Expand description
Complete LIR module
Fields§
§version: String§doc_hash: String§strings: Vec<String>§types: Vec<LirType>§cells: Vec<LirCell>§tools: Vec<LirTool>§policies: Vec<LirPolicy>§agents: Vec<LirAgent>§addons: Vec<LirAddon>§effects: Vec<LirEffect>§effect_binds: Vec<LirEffectBind>§handlers: Vec<LirHandler>Implementations§
Source§impl LirModule
impl LirModule
pub fn new(doc_hash: String) -> Self
Sourcepub fn merge(&mut self, other: &LirModule)
pub fn merge(&mut self, other: &LirModule)
Merge another module’s definitions into this module.
This is used during import resolution to link imported modules into the main module. String table entries are deduplicated. Other items (cells, types, etc.) are appended, assuming no name conflicts (the resolver should have already checked this).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LirModule
impl<'de> Deserialize<'de> for LirModule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LirModule
impl RefUnwindSafe for LirModule
impl Send for LirModule
impl Sync for LirModule
impl Unpin for LirModule
impl UnwindSafe for LirModule
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