[][src]Struct ffishim::Data

pub struct Data {
    pub constructor: Option<Path>,
    pub opaque: bool,
    pub ident: Ident,
    pub data: Data<Variant, Field>,
}

Entry point of the ffishim crate.

This data is generated from a DeriveInput by the darling crate. Its IntoTokens implementations generates the FFIName equivalent data structure, where Name is the name of the original data structure.

It is also consumed by multiple other objects in this crate for generation of other critical logic (From, TryInto ...)

Fields

constructor: Option<Path>

Specify a constructor to construct the original data with when given the ffi form.

Enumerations cannot expose constructors at the data-structure level, and must instead expose them on a per-variant basis.

opaque: bool

The ffi type will not expose any fields of this data structure, making it opaque.

This is useful in case a data structure you have must be shared through the ffi, but it cannot be represented/modeled in the other language, or it should not.

ident: Ident

The name of the data structure.

data: Data<Variant, Field>

The list of variants (for an enum) or fields (for a struct.)

Trait Implementations

impl Debug for Data[src]

impl<'a> From<&'a Data> for From[src]

impl<'a> From<&'a Data> for TryInto[src]

impl<'a> From<&'a Data> for News[src]

impl<'a> From<&'a Data> for Free[src]

impl FromDeriveInput for Data[src]

impl ToTokens for Data[src]

Auto Trait Implementations

impl !RefUnwindSafe for Data

impl !Send for Data

impl !Sync for Data

impl Unpin for Data

impl UnwindSafe for Data

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> Spanned for T where
    T: Spanned + ?Sized
[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.