Struct wick_interface_types::EnumDefinition
source · #[non_exhaustive]pub struct EnumDefinition {
pub name: String,
pub variants: Vec<EnumVariant>,
pub description: Option<String>,
pub imported: bool,
}
Expand description
Signatures of enum type definitions.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.name: String
The name of the enum.
variants: Vec<EnumVariant>
The variants in the enum.
description: Option<String>
The optional description of the enum.
imported: bool
Whether this type is imported.
Implementations§
source§impl EnumDefinition
impl EnumDefinition
sourcepub fn new<T: Into<String>>(
name: T,
variants: Vec<EnumVariant>,
description: Option<String>
) -> Self
pub fn new<T: Into<String>>( name: T, variants: Vec<EnumVariant>, description: Option<String> ) -> Self
Constructor for EnumDefinition
Trait Implementations§
source§impl Clone for EnumDefinition
impl Clone for EnumDefinition
source§fn clone(&self) -> EnumDefinition
fn clone(&self) -> EnumDefinition
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 EnumDefinition
impl Debug for EnumDefinition
source§impl Default for EnumDefinition
impl Default for EnumDefinition
source§fn default() -> EnumDefinition
fn default() -> EnumDefinition
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for EnumDefinition
impl<'de> Deserialize<'de> for EnumDefinition
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 PartialEq<EnumDefinition> for EnumDefinition
impl PartialEq<EnumDefinition> for EnumDefinition
source§impl Serialize for EnumDefinition
impl Serialize for EnumDefinition
impl Eq for EnumDefinition
impl StructuralEq for EnumDefinition
Auto Trait Implementations§
impl RefUnwindSafe for EnumDefinition
impl Send for EnumDefinition
impl Sync for EnumDefinition
impl Unpin for EnumDefinition
impl UnwindSafe for EnumDefinition
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.