pub enum TypeDefine {
Primitive(PrimitiveType),
Complex(ComplexType),
}
Variants§
Primitive(PrimitiveType)
Complex(ComplexType)
Implementations§
Source§impl TypeDefine
impl TypeDefine
Sourcepub fn is_primitive(&self) -> bool
pub fn is_primitive(&self) -> bool
Returns true
if the type define is Primitive
.
Sourcepub fn is_complex(&self) -> bool
pub fn is_complex(&self) -> bool
Returns true
if the type define is Complex
.
pub fn as_primitive(&self) -> Option<&PrimitiveType>
Trait Implementations§
Source§impl Clone for TypeDefine
impl Clone for TypeDefine
Source§fn clone(&self) -> TypeDefine
fn clone(&self) -> TypeDefine
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 TypeDefine
impl Debug for TypeDefine
Source§impl<'de> Deserialize<'de> for TypeDefine
impl<'de> Deserialize<'de> for TypeDefine
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 Display for TypeDefine
impl Display for TypeDefine
Source§impl From<ComplexType> for TypeDefine
impl From<ComplexType> for TypeDefine
Source§fn from(v: ComplexType) -> Self
fn from(v: ComplexType) -> Self
Converts to this type from the input type.
Source§impl From<PrimitiveType> for TypeDefine
impl From<PrimitiveType> for TypeDefine
Source§fn from(v: PrimitiveType) -> Self
fn from(v: PrimitiveType) -> Self
Converts to this type from the input type.
Source§impl PartialEq<PrimitiveType> for TypeDefine
impl PartialEq<PrimitiveType> for TypeDefine
Source§impl PartialEq for TypeDefine
impl PartialEq for TypeDefine
Source§impl Serialize for TypeDefine
impl Serialize for TypeDefine
Source§impl TryFrom<TypeDefine> for ComplexType
impl TryFrom<TypeDefine> for ComplexType
Source§type Error = TypeDefine
type Error = TypeDefine
The type returned in the event of a conversion error.
Source§impl TryFrom<TypeDefine> for PrimitiveType
impl TryFrom<TypeDefine> for PrimitiveType
Source§type Error = TypeDefine
type Error = TypeDefine
The type returned in the event of a conversion error.
impl StructuralPartialEq for TypeDefine
Auto Trait Implementations§
impl Freeze for TypeDefine
impl RefUnwindSafe for TypeDefine
impl Send for TypeDefine
impl Sync for TypeDefine
impl Unpin for TypeDefine
impl UnwindSafe for TypeDefine
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