pub struct ForeignModule {
pub path: PathBuf,
pub file: PathBuf,
pub includes: Vec<PathBuf>,
pub kind: ForeignKind,
pub exports: Vec<ForeignFn>,
pub contracts: BTreeMap<String, ForeignContract>,
}Expand description
One imported file and the functions it exports. Shared by every program
that imports the same file: it is read and parsed once, into
ForeignModules, which keeps it.
Fields§
§path: PathBufThe file’s identity: its normalised project-relative path (see
ForeignModules), what an Import resolves
to.
file: PathBufWhere the file was read from on disk.
includes: Vec<PathBuf>The include path it was read with; a verifier reads it the same way.
kind: ForeignKindWhat the file is, from its extension: its language, and for C whether it is a header.
exports: Vec<ForeignFn>Every function the file exports, in source order; the first declaration of a name wins.
contracts: BTreeMap<String, ForeignContract>Each function’s contract as written, by name.
Implementations§
Trait Implementations§
Source§impl Clone for ForeignModule
impl Clone for ForeignModule
Source§fn clone(&self) -> ForeignModule
fn clone(&self) -> ForeignModule
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ForeignModule
impl Debug for ForeignModule
Auto Trait Implementations§
impl Freeze for ForeignModule
impl RefUnwindSafe for ForeignModule
impl Send for ForeignModule
impl Sync for ForeignModule
impl Unpin for ForeignModule
impl UnsafeUnpin for ForeignModule
impl UnwindSafe for ForeignModule
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.