pub enum CustomType {
Struct {
name: TypeName,
description: Option<String>,
members: Vec<StructMember>,
},
Enum {
name: TypeName,
description: Option<String>,
variants: Vec<EnumVariant>,
},
}Expand description
Custom type definition. It covers structs and enums.
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for CustomType
impl Clone for CustomType
Source§fn clone(&self) -> CustomType
fn clone(&self) -> CustomType
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 CustomType
impl Debug for CustomType
Source§impl<'de> Deserialize<'de> for CustomType
impl<'de> Deserialize<'de> for CustomType
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 Hash for CustomType
impl Hash for CustomType
Source§impl JsonSchema for CustomType
impl JsonSchema for CustomType
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(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§fn always_inline_schema() -> bool
fn always_inline_schema() -> bool
👎Deprecated: Use
inline_schema() insteadOnly included for backward-compatibility - use
inline_schema() instead“. Read moreSource§impl Ord for CustomType
impl Ord for CustomType
Source§fn cmp(&self, other: &CustomType) -> Ordering
fn cmp(&self, other: &CustomType) -> 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 PartialEq for CustomType
impl PartialEq for CustomType
Source§impl PartialOrd for CustomType
impl PartialOrd for CustomType
Source§impl Serialize for CustomType
impl Serialize for CustomType
impl Eq for CustomType
impl StructuralPartialEq for CustomType
Auto Trait Implementations§
impl Freeze for CustomType
impl RefUnwindSafe for CustomType
impl Send for CustomType
impl Sync for CustomType
impl Unpin for CustomType
impl UnwindSafe for CustomType
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