pub struct InputVariant {
ident: Ident,
attr_name: Option<String>,
data: Fields<InputField>,
skip: Option<bool>,
pub word: Option<SpannedValue<bool>>,
allow_unknown_fields: Option<bool>,
}
Fields§
§ident: Ident
§attr_name: Option<String>
§data: Fields<InputField>
§skip: Option<bool>
§word: Option<SpannedValue<bool>>
Whether or not the variant should be used to create an instance for
FromMeta::from_word
.
allow_unknown_fields: Option<bool>
Whether or not unknown fields are acceptable in this
Implementations§
source§impl InputVariant
impl InputVariant
pub fn as_codegen_variant<'a>(&'a self, ty_ident: &'a Ident) -> Variant<'a>
pub fn from_variant(v: &Variant, parent: Option<&Core>) -> Result<Self>
fn with_inherited(self, parent: &Core) -> Self
Trait Implementations§
source§impl Clone for InputVariant
impl Clone for InputVariant
source§fn clone(&self) -> InputVariant
fn clone(&self) -> InputVariant
Returns a copy 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 InputVariant
impl Debug for InputVariant
source§impl ParseAttribute for InputVariant
impl ParseAttribute for InputVariant
Auto Trait Implementations§
impl Freeze for InputVariant
impl RefUnwindSafe for InputVariant
impl !Send for InputVariant
impl !Sync for InputVariant
impl Unpin for InputVariant
impl UnwindSafe for InputVariant
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)