pub enum TyTupleField {
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§
Source§impl TyTupleField
impl TyTupleField
Sourcepub fn is_single(&self) -> bool
pub fn is_single(&self) -> bool
Returns true if this is a TyTupleField::Single
, otherwise false
Sourcepub 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 TyTupleField::Single
, otherwise None
Sourcepub 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 TyTupleField::Single
, otherwise None
Sourcepub fn into_single(self) -> Result<(Option<String>, Option<Ty>), Self>
pub fn into_single(self) -> Result<(Option<String>, Option<Ty>), Self>
Returns the inner fields if this is a TyTupleField::Single
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_wildcard(&self) -> bool
pub fn is_wildcard(&self) -> bool
Returns true if this is a TyTupleField::Wildcard
, otherwise false
Sourcepub 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 TyTupleField::Wildcard
, otherwise None
Sourcepub 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 TyTupleField::Wildcard
, otherwise None
Sourcepub fn into_wildcard(self) -> Result<Option<Ty>, Self>
pub fn into_wildcard(self) -> Result<Option<Ty>, Self>
Returns the inner fields if this is a TyTupleField::Wildcard
, otherwise returns back the enum in the Err
case of the result
Trait Implementations§
Source§impl Clone for TyTupleField
impl Clone for TyTupleField
Source§fn clone(&self) -> TyTupleField
fn clone(&self) -> TyTupleField
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more