pub struct ContractTable { /* private fields */ }Expand description
The contract of each foreign function a program calls that has one. Empty when no called function is annotated.
Implementations§
Source§impl ContractTable
impl ContractTable
Sourcepub fn insert(&mut self, f: FfnId, contract: FnContract)
pub fn insert(&mut self, f: FfnId, contract: FnContract)
Record f’s contract.
Sourcepub fn contract(&self, f: FfnId) -> Option<&FnContract>
pub fn contract(&self, f: FfnId) -> Option<&FnContract>
The contract of f, if it has one.
Sourcepub fn function_count(&self) -> usize
pub fn function_count(&self) -> usize
Number of contracted functions.
Sourcepub fn function_counts(&self) -> Vec<(ForeignLang, usize)>
pub fn function_counts(&self) -> Vec<(ForeignLang, usize)>
The same count per language, in a fixed order.
Trait Implementations§
Source§impl Debug for ContractTable
impl Debug for ContractTable
Source§impl Default for ContractTable
impl Default for ContractTable
Source§fn default() -> ContractTable
fn default() -> ContractTable
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ContractTable
impl RefUnwindSafe for ContractTable
impl Send for ContractTable
impl Sync for ContractTable
impl Unpin for ContractTable
impl UnsafeUnpin for ContractTable
impl UnwindSafe for ContractTable
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
§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.