Enum prql_compiler::ast::rq::RelationKind
source · pub enum RelationKind {
ExternRef(TableExternRef),
Pipeline(Vec<Transform>),
Literal(RelationLiteral),
SString(Vec<InterpolateItem<Expr>>),
}
Variants§
ExternRef(TableExternRef)
Pipeline(Vec<Transform>)
Literal(RelationLiteral)
SString(Vec<InterpolateItem<Expr>>)
Implementations§
source§impl RelationKind
impl RelationKind
sourcepub fn as_extern_ref_mut(&mut self) -> Option<&mut TableExternRef>
pub fn as_extern_ref_mut(&mut self) -> Option<&mut TableExternRef>
Optionally returns mutable references to the inner fields if this is a RelationKind::ExternRef
, otherwise None
sourcepub fn as_extern_ref(&self) -> Option<&TableExternRef>
pub fn as_extern_ref(&self) -> Option<&TableExternRef>
Optionally returns references to the inner fields if this is a RelationKind::ExternRef
, otherwise None
sourcepub fn into_extern_ref(self) -> Result<TableExternRef, Self>
pub fn into_extern_ref(self) -> Result<TableExternRef, Self>
Returns the inner fields if this is a RelationKind::ExternRef
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_pipeline_mut(&mut self) -> Option<&mut Vec<Transform>>
pub fn as_pipeline_mut(&mut self) -> Option<&mut Vec<Transform>>
Optionally returns mutable references to the inner fields if this is a RelationKind::Pipeline
, otherwise None
sourcepub fn as_pipeline(&self) -> Option<&Vec<Transform>>
pub fn as_pipeline(&self) -> Option<&Vec<Transform>>
Optionally returns references to the inner fields if this is a RelationKind::Pipeline
, otherwise None
sourcepub fn into_pipeline(self) -> Result<Vec<Transform>, Self>
pub fn into_pipeline(self) -> Result<Vec<Transform>, Self>
Returns the inner fields if this is a RelationKind::Pipeline
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_literal_mut(&mut self) -> Option<&mut RelationLiteral>
pub fn as_literal_mut(&mut self) -> Option<&mut RelationLiteral>
Optionally returns mutable references to the inner fields if this is a RelationKind::Literal
, otherwise None
sourcepub fn as_literal(&self) -> Option<&RelationLiteral>
pub fn as_literal(&self) -> Option<&RelationLiteral>
Optionally returns references to the inner fields if this is a RelationKind::Literal
, otherwise None
sourcepub fn into_literal(self) -> Result<RelationLiteral, Self>
pub fn into_literal(self) -> Result<RelationLiteral, Self>
Returns the inner fields if this is a RelationKind::Literal
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_s_string_mut(&mut self) -> Option<&mut Vec<InterpolateItem<Expr>>>
pub fn as_s_string_mut(&mut self) -> Option<&mut Vec<InterpolateItem<Expr>>>
Optionally returns mutable references to the inner fields if this is a RelationKind::SString
, otherwise None
sourcepub fn as_s_string(&self) -> Option<&Vec<InterpolateItem<Expr>>>
pub fn as_s_string(&self) -> Option<&Vec<InterpolateItem<Expr>>>
Optionally returns references to the inner fields if this is a RelationKind::SString
, otherwise None
sourcepub fn into_s_string(self) -> Result<Vec<InterpolateItem<Expr>>, Self>
pub fn into_s_string(self) -> Result<Vec<InterpolateItem<Expr>>, Self>
Returns the inner fields if this is a RelationKind::SString
, otherwise returns back the enum in the Err
case of the result
Trait Implementations§
source§impl Clone for RelationKind
impl Clone for RelationKind
source§fn clone(&self) -> RelationKind
fn clone(&self) -> RelationKind
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RelationKind
impl Debug for RelationKind
source§impl<'de> Deserialize<'de> for RelationKind
impl<'de> Deserialize<'de> for RelationKind
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>,
source§impl PartialEq<RelationKind> for RelationKind
impl PartialEq<RelationKind> for RelationKind
source§fn eq(&self, other: &RelationKind) -> bool
fn eq(&self, other: &RelationKind) -> bool
self
and other
values to be equal, and is used
by ==
.