pub enum IRTypeRef {
Primitive(PrimitiveKind),
Option(Box<IRTypeRef>),
Vec(Box<IRTypeRef>),
Named(String),
Map(Box<IRTypeRef>, Box<IRTypeRef>),
}Expand description
Type reference
Variants§
Primitive(PrimitiveKind)
Primitive types (String, i32, f64, bool, etc.)
Option(Box<IRTypeRef>)
Option
Vec(Box<IRTypeRef>)
Vec
Named(String)
Named type (struct/enum reference)
Map(Box<IRTypeRef>, Box<IRTypeRef>)
Map/HashMap<K, V>
Implementations§
Source§impl IRTypeRef
impl IRTypeRef
pub fn is_primitive(&self) -> bool
pub fn is_optional(&self) -> bool
pub fn make_optional(self) -> IRTypeRef
Trait Implementations§
Source§impl<'de> Deserialize<'de> for IRTypeRef
impl<'de> Deserialize<'de> for IRTypeRef
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<IRTypeRef, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<IRTypeRef, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for IRTypeRef
impl Serialize for IRTypeRef
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for IRTypeRef
impl StructuralPartialEq for IRTypeRef
Auto Trait Implementations§
impl Freeze for IRTypeRef
impl RefUnwindSafe for IRTypeRef
impl Send for IRTypeRef
impl Sync for IRTypeRef
impl Unpin for IRTypeRef
impl UnsafeUnpin for IRTypeRef
impl UnwindSafe for IRTypeRef
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.