Struct prql_compiler::ast::Ty
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§
§impl Ty
impl Ty
pub fn new<K>(kind: K) -> Ty
pub fn relation(tuple_fields: Vec<TupleField>) -> Ty
pub fn never() -> Ty
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§
§impl<'de> Deserialize<'de> for Ty
impl<'de> Deserialize<'de> for Ty
§fn deserialize<__D>(
__deserializer: __D
) -> Result<Ty, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Ty, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Serialize for Ty
impl Serialize for Ty
§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 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