Struct passerine::core::ffi::FFI[][src]

pub struct FFI(_);

A foreign functional interface, mapping names to functions, passed to the compiler at the bytecode generation step.

Implementations

impl FFI[src]

pub fn new() -> FFI[src]

Creates a new empty Foreign Functional Interface.

pub fn add(&mut self, name: &str, function: FFIFunction) -> Result<(), String>[src]

Returns true if the function has already been added to the FFI.

pub fn get(&mut self, name: &str) -> Result<FFIFunction, String>[src]

Returns the FFIFunction interned with the provided name.

pub fn combine(&mut self, other: FFI) -> Result<(), FFI>[src]

Tries to merge one FFI into another. If there was a name collision, this function returns an Err(FFI) with the functions that collided.

Auto Trait Implementations

impl !RefUnwindSafe for FFI[src]

impl !Send for FFI[src]

impl !Sync for FFI[src]

impl Unpin for FFI[src]

impl !UnwindSafe for FFI[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.