pub struct TypeRef {
pub kind: TypeKind,
pub name: Option<String>,
pub inner: Vec<TypeRef>,
pub optional: bool,
pub nullable: bool,
pub value: Option<Value>,
}Expand description
A reference to a value type in the Zynk API graph.
Fields§
§kind: TypeKind§name: Option<String>§inner: Vec<TypeRef>§optional: bool§nullable: bool§value: Option<Value>Implementations§
Source§impl TypeRef
impl TypeRef
pub fn new(kind: TypeKind) -> Self
pub fn primitive(name: impl Into<String>) -> Self
pub fn model(name: impl Into<String>) -> Self
pub fn enum_ref(name: impl Into<String>) -> Self
pub fn array(item: TypeRef) -> Self
pub fn record(key: TypeRef, value: TypeRef) -> Self
pub fn union(types: Vec<TypeRef>) -> Self
pub fn literal(value: Value) -> Self
pub fn any() -> Self
pub fn void() -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TypeRef
impl<'de> Deserialize<'de> for TypeRef
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
impl StructuralPartialEq for TypeRef
Auto Trait Implementations§
impl Freeze for TypeRef
impl RefUnwindSafe for TypeRef
impl Send for TypeRef
impl Sync for TypeRef
impl Unpin for TypeRef
impl UnsafeUnpin for TypeRef
impl UnwindSafe for TypeRef
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