pub struct Two<'scope, Mode: TableMode, A: Value, B: Value> {
pub a: Mode::T<'scope, A>,
pub b: Mode::T<'scope, B>,
}Expand description
A helper table with two fields.
Fields§
§a: Mode::T<'scope, A>§b: Mode::T<'scope, B>Trait Implementations§
Source§impl<T: TableMode, A, B> ForLifetimeTable for Two<'static, T, A, B>
impl<T: TableMode, A, B> ForLifetimeTable for Two<'static, T, A, B>
Source§impl<'scope, Mode: TableMode, A, B> MapTable<'scope> for Two<'scope, Mode, A, B>
impl<'scope, Mode: TableMode, A, B> MapTable<'scope> for Two<'scope, Mode, A, B>
Source§fn map_modes<Mapper, DestMode>(self, mapper: &mut Mapper) -> Self::Of<DestMode>
fn map_modes<Mapper, DestMode>(self, mapper: &mut Mapper) -> Self::Of<DestMode>
Map each field of the table Read more
Source§fn map_modes_ref<Mapper, DestMode>(
&self,
mapper: &mut Mapper,
) -> Self::Of<DestMode>
fn map_modes_ref<Mapper, DestMode>( &self, mapper: &mut Mapper, ) -> Self::Of<DestMode>
Map each field of the table, with a reference Read more
Source§fn map_modes_mut<Mapper, DestMode>(
&mut self,
mapper: &mut Mapper,
) -> Self::Of<DestMode>
fn map_modes_mut<Mapper, DestMode>( &mut self, mapper: &mut Mapper, ) -> Self::Of<DestMode>
Map each field of the table, with a mutable reference Read more
Source§impl<A, B> ShortenLifetime for Two<'static, EmptyMode, A, B>
impl<A, B> ShortenLifetime for Two<'static, EmptyMode, A, B>
type Shortened<'small> = Two<'small, EmptyMode, A, B> where Self: 'small
Source§fn shorten_lifetime<'small, 'large: 'small>(self) -> Self::Shortened<'small>where
Self: 'large,
fn shorten_lifetime<'small, 'large: 'small>(self) -> Self::Shortened<'small>where
Self: 'large,
Shorten a lifetime, normally rust does this automatically, but if
the lifetime is invariant due to being used in a Gat or trait, we
need to do it manually. Read more
Source§impl<A, B> ShortenLifetime for Two<'static, ExprMode, A, B>
impl<A, B> ShortenLifetime for Two<'static, ExprMode, A, B>
type Shortened<'small> = Two<'small, ExprMode, A, B> where Self: 'small
Source§fn shorten_lifetime<'small, 'large: 'small>(self) -> Self::Shortened<'small>where
Self: 'large,
fn shorten_lifetime<'small, 'large: 'small>(self) -> Self::Shortened<'small>where
Self: 'large,
Shorten a lifetime, normally rust does this automatically, but if
the lifetime is invariant due to being used in a Gat or trait, we
need to do it manually. Read more
Source§impl<A, B> ShortenLifetime for Two<'static, ExprNullifiedMode, A, B>
impl<A, B> ShortenLifetime for Two<'static, ExprNullifiedMode, A, B>
type Shortened<'small> = Two<'small, ExprNullifiedMode, A, B> where Self: 'small
Source§fn shorten_lifetime<'small, 'large: 'small>(self) -> Self::Shortened<'small>where
Self: 'large,
fn shorten_lifetime<'small, 'large: 'small>(self) -> Self::Shortened<'small>where
Self: 'large,
Shorten a lifetime, normally rust does this automatically, but if
the lifetime is invariant due to being used in a Gat or trait, we
need to do it manually. Read more
Source§impl<A, B> ShortenLifetime for Two<'static, NameMode, A, B>
impl<A, B> ShortenLifetime for Two<'static, NameMode, A, B>
type Shortened<'small> = Two<'small, NameMode, A, B> where Self: 'small
Source§fn shorten_lifetime<'small, 'large: 'small>(self) -> Self::Shortened<'small>where
Self: 'large,
fn shorten_lifetime<'small, 'large: 'small>(self) -> Self::Shortened<'small>where
Self: 'large,
Shorten a lifetime, normally rust does this automatically, but if
the lifetime is invariant due to being used in a Gat or trait, we
need to do it manually. Read more
Source§impl<A, B> ShortenLifetime for Two<'static, ValueMode, A, B>
impl<A, B> ShortenLifetime for Two<'static, ValueMode, A, B>
type Shortened<'small> = Two<'small, ValueMode, A, B> where Self: 'small
Source§fn shorten_lifetime<'small, 'large: 'small>(self) -> Self::Shortened<'small>where
Self: 'large,
fn shorten_lifetime<'small, 'large: 'small>(self) -> Self::Shortened<'small>where
Self: 'large,
Shorten a lifetime, normally rust does this automatically, but if
the lifetime is invariant due to being used in a Gat or trait, we
need to do it manually. Read more
Source§impl<A, B> ShortenLifetime for Two<'static, ValueNullifiedMode, A, B>
impl<A, B> ShortenLifetime for Two<'static, ValueNullifiedMode, A, B>
type Shortened<'small> = Two<'small, ValueNullifiedMode, A, B> where Self: 'small
Source§fn shorten_lifetime<'small, 'large: 'small>(self) -> Self::Shortened<'small>where
Self: 'large,
fn shorten_lifetime<'small, 'large: 'small>(self) -> Self::Shortened<'small>where
Self: 'large,
Shorten a lifetime, normally rust does this automatically, but if
the lifetime is invariant due to being used in a Gat or trait, we
need to do it manually. Read more
Source§impl<'scope, A, B> Table<'scope> for Two<'scope, ExprMode, A, B>
impl<'scope, A, B> Table<'scope> for Two<'scope, ExprMode, A, B>
type Nullify = <Two<'scope, ExprMode, A, B> as TableHKT>::Of<ExprNullifiedMode>
type Result = <Two<'scope, ExprMode, A, B> as TableHKT>::Of<ValueMode>
Source§fn visit_mut(&mut self, f: &mut impl FnMut(&mut ErasedExpr))
fn visit_mut(&mut self, f: &mut impl FnMut(&mut ErasedExpr))
Visit each expr in the table, with a mutable reference. Read more
fn nullify(self) -> Self::Nullify
Source§impl<'scope, A, B> Table<'scope> for Two<'scope, ExprNullifiedMode, A, B>
impl<'scope, A, B> Table<'scope> for Two<'scope, ExprNullifiedMode, A, B>
type Nullify = Two<'scope, ExprNullifiedMode, A, B>
type Result = <Two<'scope, ExprNullifiedMode, A, B> as TableHKT>::Of<ValueNullifiedMode>
Source§fn visit_mut(&mut self, f: &mut impl FnMut(&mut ErasedExpr))
fn visit_mut(&mut self, f: &mut impl FnMut(&mut ErasedExpr))
Visit each expr in the table, with a mutable reference. Read more
fn nullify(self) -> Self::Nullify
Source§impl<A, B> TableLoaderSqlx for Two<'static, ExprMode, A, B>
impl<A, B> TableLoaderSqlx for Two<'static, ExprMode, A, B>
Source§fn load<'a>(
&self,
values: &mut impl Iterator<Item = AnyValueRef<'a>>,
) -> Self::Result
fn load<'a>( &self, values: &mut impl Iterator<Item = AnyValueRef<'a>>, ) -> Self::Result
Load the table given an iterator over a row’s values
Source§fn skip<'a>(&self, values: &mut impl Iterator<Item = AnyValueRef<'a>>)
fn skip<'a>(&self, values: &mut impl Iterator<Item = AnyValueRef<'a>>)
discard N columns from the iterator ofer a row
This is used when this value was discarded by a MaybeTable.
Auto Trait Implementations§
impl<'scope, Mode, A, B> Freeze for Two<'scope, Mode, A, B>
impl<'scope, Mode, A, B> RefUnwindSafe for Two<'scope, Mode, A, B>where
<Mode as TableMode>::T<'scope, A>: RefUnwindSafe,
<Mode as TableMode>::T<'scope, B>: RefUnwindSafe,
impl<'scope, Mode, A, B> Send for Two<'scope, Mode, A, B>
impl<'scope, Mode, A, B> Sync for Two<'scope, Mode, A, B>
impl<'scope, Mode, A, B> Unpin for Two<'scope, Mode, A, B>
impl<'scope, Mode, A, B> UnwindSafe for Two<'scope, Mode, A, B>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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