pub struct StructOptions {
pub field_casing: Casing,
pub rust_module: Option<String>,
}Fields§
§field_casing: Casing§rust_module: Option<String>Rust module path 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_module = "my_crate")]
struct MyStruct { /* ... */ }This will set "my_crate" as the rust_module, to
be used by the Rust plugin generator to generate a use statement such
as:
pub use my_crate::MyStruct;Instead of generating the struct definition itself.
Implementations§
Source§impl StructOptions
impl StructOptions
pub fn from_attrs(attrs: &[Attribute]) -> Self
pub fn to_serde_attrs(&self) -> Vec<String>
Trait Implementations§
Source§impl Clone for StructOptions
impl Clone for StructOptions
Source§fn clone(&self) -> StructOptions
fn clone(&self) -> StructOptions
Returns a duplicate of the value. Read more
1.0.0 · 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 StructOptions
impl Debug for StructOptions
Source§impl Default for StructOptions
impl Default for StructOptions
Source§fn default() -> StructOptions
fn default() -> StructOptions
Returns the “default value” for a type. Read more
Source§impl Hash for StructOptions
impl Hash for StructOptions
Source§impl Parse for StructOptions
impl Parse for StructOptions
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl PartialEq for StructOptions
impl PartialEq for StructOptions
impl Eq for StructOptions
impl StructuralPartialEq for StructOptions
Auto Trait Implementations§
impl Freeze for StructOptions
impl RefUnwindSafe for StructOptions
impl Send for StructOptions
impl Sync for StructOptions
impl Unpin for StructOptions
impl UnwindSafe for StructOptions
Blanket Implementations§
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.