Enum prql_compiler::ast::TupleField
pub enum TupleField {
Single(Option<String>, Option<Ty>),
Wildcard(Option<Ty>),
}
Variants§
Single(Option<String>, Option<Ty>)
Named tuple element.
Wildcard(Option<Ty>)
Placeholder for possibly many elements. Means “and other unmentioned columns”. Does not mean “all columns”.
Implementations§
§impl TupleField
impl TupleField
pub fn as_single_mut(
&mut self
) -> Option<(&mut Option<String>, &mut Option<Ty>)>
pub fn as_single_mut( &mut self ) -> Option<(&mut Option<String>, &mut Option<Ty>)>
Optionally returns mutable references to the inner fields if this is a TupleField::Single
, otherwise None
pub fn as_single(&self) -> Option<(&Option<String>, &Option<Ty>)>
pub fn as_single(&self) -> Option<(&Option<String>, &Option<Ty>)>
Optionally returns references to the inner fields if this is a TupleField::Single
, otherwise None
pub fn into_single(self) -> Result<(Option<String>, Option<Ty>), TupleField>
pub fn into_single(self) -> Result<(Option<String>, Option<Ty>), TupleField>
Returns the inner fields if this is a TupleField::Single
, otherwise returns back the enum in the Err
case of the result
pub fn is_wildcard(&self) -> bool
pub fn is_wildcard(&self) -> bool
Returns true if this is a TupleField::Wildcard
, otherwise false
pub fn as_wildcard_mut(&mut self) -> Option<&mut Option<Ty>>
pub fn as_wildcard_mut(&mut self) -> Option<&mut Option<Ty>>
Optionally returns mutable references to the inner fields if this is a TupleField::Wildcard
, otherwise None
pub fn as_wildcard(&self) -> Option<&Option<Ty>>
pub fn as_wildcard(&self) -> Option<&Option<Ty>>
Optionally returns references to the inner fields if this is a TupleField::Wildcard
, otherwise None
pub fn into_wildcard(self) -> Result<Option<Ty>, TupleField>
pub fn into_wildcard(self) -> Result<Option<Ty>, TupleField>
Returns the inner fields if this is a TupleField::Wildcard
, otherwise returns back the enum in the Err
case of the result
§impl TupleField
impl TupleField
Trait Implementations§
§impl Clone for TupleField
impl Clone for TupleField
§fn clone(&self) -> TupleField
fn clone(&self) -> TupleField
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for TupleField
impl Debug for TupleField
§impl<'de> Deserialize<'de> for TupleField
impl<'de> Deserialize<'de> for TupleField
§fn deserialize<__D>(
__deserializer: __D
) -> Result<TupleField, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<TupleField, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl PartialEq for TupleField
impl PartialEq for TupleField
§fn eq(&self, other: &TupleField) -> bool
fn eq(&self, other: &TupleField) -> bool
self
and other
values to be equal, and is used
by ==
.