Struct fp_bindgen::types::EnumOptions
source · [−]pub struct EnumOptions {
pub variant_casing: Casing,
pub content_prop_name: Option<String>,
pub tag_prop_name: Option<String>,
pub untagged: bool,
pub native_modules: BTreeMap<String, String>,
}
Fields
variant_casing: Casing
content_prop_name: Option<String>
tag_prop_name: Option<String>
untagged: bool
If true
, serialized variants are not tagged, and a match is found
by attempting to deserialize variants in order, where the first one to
successfully deserialize is used as the result.
native_modules: BTreeMap<String, String>
Rust module paths where the type can be found for the given generator. If present, the generator can use this type instead of generating it.
Example:
#[fp(rust_plugin_module = "my_crate")]
enum MyEnum { /* ... */ }
This will insert "rust_plugin" => "my_crate"
into the map, which can
be used by the Rust plugin generator to generate a use
statement such
as:
pub use my_crate::MyEnum;
Instead of generating the enum definition itself.
Implementations
sourceimpl EnumOptions
impl EnumOptions
Trait Implementations
sourceimpl Clone for EnumOptions
impl Clone for EnumOptions
sourcefn clone(&self) -> EnumOptions
fn clone(&self) -> EnumOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for EnumOptions
impl Debug for EnumOptions
sourceimpl Default for EnumOptions
impl Default for EnumOptions
sourcefn default() -> EnumOptions
fn default() -> EnumOptions
Returns the “default value” for a type. Read more
sourceimpl Hash for EnumOptions
impl Hash for EnumOptions
sourceimpl Parse for EnumOptions
impl Parse for EnumOptions
fn parse(input: ParseStream<'_>) -> Result<Self>
sourceimpl PartialEq<EnumOptions> for EnumOptions
impl PartialEq<EnumOptions> for EnumOptions
sourcefn eq(&self, other: &EnumOptions) -> bool
fn eq(&self, other: &EnumOptions) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl Eq for EnumOptions
impl StructuralEq for EnumOptions
impl StructuralPartialEq for EnumOptions
Auto Trait Implementations
impl RefUnwindSafe for EnumOptions
impl Send for EnumOptions
impl Sync for EnumOptions
impl Unpin for EnumOptions
impl UnwindSafe for EnumOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more