pub struct VariantAttrs {
pub field_casing: Casing,
pub rename: Option<String>,
}Fields§
§field_casing: Casing§rename: Option<String>Optional name to use in the serialized format (only used if different than the variant name itself).
Implementations§
Source§impl VariantAttrs
impl VariantAttrs
pub fn from_attrs(attrs: &[Attribute]) -> Self
pub fn to_serde_attrs(&self) -> Vec<String>
Trait Implementations§
Source§impl Clone for VariantAttrs
impl Clone for VariantAttrs
Source§fn clone(&self) -> VariantAttrs
fn clone(&self) -> VariantAttrs
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 VariantAttrs
impl Debug for VariantAttrs
Source§impl Default for VariantAttrs
impl Default for VariantAttrs
Source§fn default() -> VariantAttrs
fn default() -> VariantAttrs
Returns the “default value” for a type. Read more
Source§impl Hash for VariantAttrs
impl Hash for VariantAttrs
Source§impl Parse for VariantAttrs
impl Parse for VariantAttrs
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl PartialEq for VariantAttrs
impl PartialEq for VariantAttrs
impl Eq for VariantAttrs
impl StructuralPartialEq for VariantAttrs
Auto Trait Implementations§
impl Freeze for VariantAttrs
impl RefUnwindSafe for VariantAttrs
impl Send for VariantAttrs
impl Sync for VariantAttrs
impl Unpin for VariantAttrs
impl UnwindSafe for VariantAttrs
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.