Struct tealr::EnumGenerator
source · pub struct EnumGenerator {
pub name: Cow<'static, [NamePart]>,
pub variants: Vec<NameContainer>,
pub type_doc: String,
}
Expand description
contains all the information needed to create a teal enum.
Fields§
§name: Cow<'static, [NamePart]>
the name of this enum
variants: Vec<NameContainer>
the variants that make up this enum.
type_doc: String
documentation for this enum
Implementations§
source§impl EnumGenerator
impl EnumGenerator
sourcepub fn new<A: ToTypename>() -> Self
pub fn new<A: ToTypename>() -> Self
creates a new EnumGenerator
sourcepub fn document_type(&mut self, documentation: &str) -> &mut Self
pub fn document_type(&mut self, documentation: &str) -> &mut Self
Add type level documentation to this enum
Trait Implementations§
source§impl Clone for EnumGenerator
impl Clone for EnumGenerator
source§fn clone(&self) -> EnumGenerator
fn clone(&self) -> EnumGenerator
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<'de> Deserialize<'de> for EnumGenerator
impl<'de> Deserialize<'de> for EnumGenerator
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 From<EnumGenerator> for TypeGenerator
impl From<EnumGenerator> for TypeGenerator
source§fn from(a: EnumGenerator) -> Self
fn from(a: EnumGenerator) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for EnumGenerator
impl Send for EnumGenerator
impl Sync for EnumGenerator
impl Unpin for EnumGenerator
impl UnwindSafe for EnumGenerator
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