pub struct VariantAttribute {
pub description: Option<String>,
pub deprecated: bool,
pub rename: Option<String>,
pub skip: bool,
pub format_renames: IndexMap<String, String>,
pub aliases: Vec<String>,
pub format_metadata: IndexMap<String, IndexMap<String, Value>>,
}Fields§
§description: Option<String>§deprecated: bool§rename: Option<String>§skip: bool§format_renames: IndexMap<String, String>§aliases: Vec<String>§format_metadata: IndexMap<String, IndexMap<String, Value>>Implementations§
Source§impl VariantAttribute
impl VariantAttribute
pub fn new() -> VariantAttribute
pub fn with_description( self, description: impl Into<String>, ) -> VariantAttribute
pub fn deprecated(self) -> VariantAttribute
pub fn with_rename(self, name: impl Into<String>) -> VariantAttribute
pub fn skip(self) -> VariantAttribute
pub fn rename_for( self, format: impl Into<String>, name: impl Into<String>, ) -> VariantAttribute
pub fn with_alias(self, alias: impl Into<String>) -> VariantAttribute
pub fn effective_name<'a>(&'a self, format: &str, original: &'a str) -> &'a str
Trait Implementations§
Source§impl Clone for VariantAttribute
impl Clone for VariantAttribute
Source§fn clone(&self) -> VariantAttribute
fn clone(&self) -> VariantAttribute
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 VariantAttribute
impl Debug for VariantAttribute
Source§impl Default for VariantAttribute
impl Default for VariantAttribute
Source§fn default() -> VariantAttribute
fn default() -> VariantAttribute
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for VariantAttribute
impl<'de> Deserialize<'de> for VariantAttribute
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<VariantAttribute, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<VariantAttribute, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for VariantAttribute
impl PartialEq for VariantAttribute
Source§impl Serialize for VariantAttribute
impl Serialize for VariantAttribute
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for VariantAttribute
Auto Trait Implementations§
impl Freeze for VariantAttribute
impl RefUnwindSafe for VariantAttribute
impl Send for VariantAttribute
impl Sync for VariantAttribute
impl Unpin for VariantAttribute
impl UnwindSafe for VariantAttribute
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