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 moreSource§impl Debug for TyTupleField
impl Debug for TyTupleField
Source§impl<'de> Deserialize<'de> for TyTupleField
impl<'de> Deserialize<'de> for TyTupleField
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 JsonSchema for TyTupleField
impl JsonSchema for TyTupleField
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref
keyword. Read moreSource§impl PartialEq for TyTupleField
impl PartialEq for TyTupleField
Source§impl Serialize for TyTupleField
impl Serialize for TyTupleField
impl StructuralPartialEq for TyTupleField
Auto Trait Implementations§
impl Freeze for TyTupleField
impl RefUnwindSafe for TyTupleField
impl Send for TyTupleField
impl Sync for TyTupleField
impl Unpin for TyTupleField
impl UnwindSafe for TyTupleField
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more