pub struct EnumVariant<'a> {
pub name: &'a str,
pub description: &'a str,
}
Expand description
A variant of an Enum
.
Fields§
§name: &'a str
The name of the variant.
description: &'a str
The description of the variant. This is a markdown string derived from the NatSpec documentation.
Trait Implementations§
Source§impl<'a> Clone for EnumVariant<'a>
impl<'a> Clone for EnumVariant<'a>
Source§fn clone(&self) -> EnumVariant<'a>
fn clone(&self) -> EnumVariant<'a>
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<'a> Debug for EnumVariant<'a>
impl<'a> Debug for EnumVariant<'a>
Source§impl<'de: 'a, 'a> Deserialize<'de> for EnumVariant<'a>
impl<'de: 'a, 'a> Deserialize<'de> for EnumVariant<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> JsonSchema for EnumVariant<'a>
impl<'a> JsonSchema for EnumVariant<'a>
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§impl<'a> Ord for EnumVariant<'a>
impl<'a> Ord for EnumVariant<'a>
Source§fn cmp(&self, other: &EnumVariant<'a>) -> Ordering
fn cmp(&self, other: &EnumVariant<'a>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a> PartialEq for EnumVariant<'a>
impl<'a> PartialEq for EnumVariant<'a>
Source§impl<'a> PartialOrd for EnumVariant<'a>
impl<'a> PartialOrd for EnumVariant<'a>
Source§impl<'a> Serialize for EnumVariant<'a>
impl<'a> Serialize for EnumVariant<'a>
impl<'a> Eq for EnumVariant<'a>
impl<'a> StructuralPartialEq for EnumVariant<'a>
Auto Trait Implementations§
impl<'a> Freeze for EnumVariant<'a>
impl<'a> RefUnwindSafe for EnumVariant<'a>
impl<'a> Send for EnumVariant<'a>
impl<'a> Sync for EnumVariant<'a>
impl<'a> Unpin for EnumVariant<'a>
impl<'a> UnwindSafe for EnumVariant<'a>
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
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes