pub struct Ty {
pub kind: TyKind,
pub span: Option<Span>,
pub name: Option<String>,
}
Fields§
§kind: TyKind
§span: Option<Span>
§name: Option<String>
Name inferred from the type declaration.
Implementations§
source§impl Ty
impl Ty
pub fn new<K: Into<TyKind>>(kind: K) -> Ty
pub fn relation(tuple_fields: Vec<TupleField>) -> Self
pub fn never() -> Self
pub fn is_never(&self) -> bool
pub fn as_relation(&self) -> Option<&Vec<TupleField>>
pub fn as_relation_mut(&mut self) -> Option<&mut Vec<TupleField>>
pub fn into_relation(self) -> Option<Vec<TupleField>>
pub fn is_relation(&self) -> bool
Trait Implementations§
source§impl<'de> Deserialize<'de> for Ty
impl<'de> Deserialize<'de> for Ty
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 Ty
Auto Trait Implementations§
impl RefUnwindSafe for Ty
impl Send for Ty
impl Sync for Ty
impl Unpin for Ty
impl UnwindSafe for Ty
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