pub struct Program {
pub imports: Vec<Import>,
pub mappings: Vec<MappingDecl>,
pub vars: Vec<VarDecl>,
pub events: Vec<EvtDecl>,
pub processes: Vec<ProcessDecl>,
pub entry_bindings: Vec<EntryBinding>,
}Expand description
A parsed .fi program — a protection domain implementation.
Contains imports (external C/Pancake files), memory mappings, and variable declarations.
let prog = fic::parser::parse_program(r#"import "eth.c" as eth;"#).unwrap();
assert_eq!(prog.imports.len(), 1);Fields§
§imports: Vec<Import>External file imports.
mappings: Vec<MappingDecl>Memory mapping declarations.
vars: Vec<VarDecl>Local variable declarations: the program’s, its PD’s state.
events: Vec<EvtDecl>Computation event declarations from one or more Events: sections.
processes: Vec<ProcessDecl>Sub-process declarations from one or more Process: sections.
entry_bindings: Vec<EntryBinding>Platform entry-point bindings, resolved to the owning process as each
@bind-annotated process is parsed; a (platform, entry) is bound by
at most one process, the parser rejecting the second.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Program
impl RefUnwindSafe for Program
impl Send for Program
impl Sync for Program
impl Unpin for Program
impl UnsafeUnpin for Program
impl UnwindSafe for Program
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.