pub struct Session {
pub config: Config,
pub database: ChipDatabase,
}Expand description
A parsed manifest resolved against the database for its target chip.
Fields§
§config: ConfigThe parsed Consortium.toml.
database: ChipDatabaseThe chip-family database selected by [profile] chip.
Implementations§
Source§impl Session
impl Session
Sourcepub fn lower(&self) -> Result<LoweredIr, CfgError>
pub fn lower(&self) -> Result<LoweredIr, CfgError>
Lowers the validated manifest into the components
IR.
Assumes the session is already validated by Session::from_toml:
doorbells exist, parties are visible, channels are in bounds, and
regions fit SRAM. Only topology the validator does not constrain is
rejected here.
§Errors
Returns CfgError::Manifest when a channel’s primary/secondary
party has no declared endpoint, when its doorbell name cannot be typed,
or when a memory-pattern channel has no config.memory.
Source§impl Session
impl Session
Sourcepub fn from_toml(content: &str) -> Result<Self, CfgError>
pub fn from_toml(content: &str) -> Result<Self, CfgError>
Parses a Consortium.toml string, resolves its chip database, and
validates that the manifest only references resources the chip provides.
§Errors
CfgError::Manifestif the TOML is malformed.DataError::UnknownChip/DataError::DatabaseParseif the chip cannot be resolved to a bundled database.CfgError::UnknownDoorbell/CfgError::OwnerNotVisiblefromSelf::validate.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Session
impl Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
impl UnwindSafe for Session
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