pub enum ForeignType {
Void,
Scalar(String),
Pointer(Box<ForeignType>),
Struct(String),
Word,
}Expand description
A type at a C-ABI boundary, as spelled in the foreign language and
reduced to what fic can reason about. Qualifiers (const, volatile)
are dropped; they do not change the call.
Variants§
Void
void — no value (return position only).
Scalar(String)
A scalar as spelled: "int", "unsigned int", "uint8_t",
"bool", "uintptr_t", Rust "u32". Width and signedness are
resolved by the type system, which knows the target.
Pointer(Box<ForeignType>)
A pointer to the given type (const uint8_t * → Pointer(Scalar("uint8_t"))).
Struct(String)
A struct by name, by value (struct Slot, Rust #[repr(C)] Slot).
Word
A Pancake machine word (the only argument/return shape an
export fun may use).
Trait Implementations§
Source§impl Clone for ForeignType
impl Clone for ForeignType
Source§fn clone(&self) -> ForeignType
fn clone(&self) -> ForeignType
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 ForeignType
impl Debug for ForeignType
Source§impl PartialEq for ForeignType
impl PartialEq for ForeignType
Source§fn eq(&self, other: &ForeignType) -> bool
fn eq(&self, other: &ForeignType) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ForeignType
impl Serialize for ForeignType
impl Eq for ForeignType
impl StructuralPartialEq for ForeignType
Auto Trait Implementations§
impl Freeze for ForeignType
impl RefUnwindSafe for ForeignType
impl Send for ForeignType
impl Sync for ForeignType
impl Unpin for ForeignType
impl UnsafeUnpin for ForeignType
impl UnwindSafe for ForeignType
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. 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.