[−][src]Struct ffishim::Data
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]
fn from_derive_input(__di: &DeriveInput) -> Result<Self>
[src]
impl ToTokens for Data
[src]
fn to_tokens(&self, tokens: &mut TokenStream)
[src]
fn to_token_stream(&self) -> TokenStream
[src]
fn into_token_stream(self) -> TokenStream
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Spanned for T where
T: Spanned + ?Sized,
[src]
T: Spanned + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,