pub struct Enum {
pub name: String,
pub description: Option<String>,
pub repr: Option<EnumRepr>,
pub copy: bool,
pub untagged: bool,
pub variants: Vec<EnumVariant>,
}
Fields§
§name: String
§description: Option<String>
§repr: Option<EnumRepr>
§copy: bool
§untagged: bool
§variants: Vec<EnumVariant>
Implementations§
Source§impl Enum
impl Enum
pub fn from_schema(name: &str, schema: &OpenApiType<'_>) -> Option<Self>
pub fn from_parameter_schema( name: &str, schema: &OpenApiParameterSchema<'_>, ) -> Option<Self>
pub fn from_one_of(name: &str, schemas: &[OpenApiType<'_>]) -> Option<Self>
pub fn is_display(&self, resolved: &ResolvedSchema) -> bool
pub fn is_comparable(&self, resolved: &ResolvedSchema) -> bool
pub fn codegen(&self, resolved: &ResolvedSchema) -> Option<TokenStream>
Trait Implementations§
impl Eq for Enum
impl StructuralPartialEq for Enum
Auto Trait Implementations§
impl Freeze for Enum
impl RefUnwindSafe for Enum
impl Send for Enum
impl Sync for Enum
impl Unpin for Enum
impl UnwindSafe for Enum
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.