Skip to main content

Two

Struct Two 

Source
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>
where for<'a> Two<'a, T, A, B>: Table<'a>, A: Value, B: Value,

Source§

type Of<'lt> = Two<'lt, T, A, B> where T: 'lt, A: 'lt, B: 'lt

Source§

impl<'scope, Mode: TableMode, A, B> MapTable<'scope> for Two<'scope, Mode, A, B>
where A: Value, B: Value,

Source§

fn map_modes<Mapper, DestMode>(self, mapper: &mut Mapper) -> Self::Of<DestMode>
where Mapper: ModeMapper<'scope, Self::Mode, DestMode>, DestMode: TableMode,

Map each field of the table Read more
Source§

fn map_modes_ref<Mapper, DestMode>( &self, mapper: &mut Mapper, ) -> Self::Of<DestMode>
where Mapper: ModeMapperRef<'scope, Self::Mode, DestMode>, DestMode: TableMode,

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>
where Mapper: ModeMapperMut<'scope, Self::Mode, DestMode>, DestMode: TableMode,

Map each field of the table, with a mutable reference Read more
Source§

impl<A, B> ShortenLifetime for Two<'static, EmptyMode, A, B>
where A: Value, B: Value,

Source§

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,

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>
where A: Value, B: Value,

Source§

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,

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>
where A: Value, B: Value,

Source§

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,

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>
where A: Value, B: Value,

Source§

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,

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>
where A: Value, B: Value,

Source§

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,

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>
where A: Value, B: Value,

Source§

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,

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>
where <Self as TableHKT>::Of<ExprNullifiedMode>: Table<'scope>, A: Value, B: Value,

Source§

type Nullify = <Two<'scope, ExprMode, A, B> as TableHKT>::Of<ExprNullifiedMode>

Source§

type Result = <Two<'scope, ExprMode, A, B> as TableHKT>::Of<ValueMode>

Source§

fn visit(&self, f: &mut impl FnMut(&ErasedExpr))

Visit each expr in the table. Read more
Source§

fn visit_mut(&mut self, f: &mut impl FnMut(&mut ErasedExpr))

Visit each expr in the table, with a mutable reference. Read more
Source§

fn nullify(self) -> Self::Nullify

Source§

impl<'scope, A, B> Table<'scope> for Two<'scope, ExprNullifiedMode, A, B>
where A: Value, B: Value,

Source§

type Nullify = Two<'scope, ExprNullifiedMode, A, B>

Source§

type Result = <Two<'scope, ExprNullifiedMode, A, B> as TableHKT>::Of<ValueNullifiedMode>

Source§

fn visit(&self, f: &mut impl FnMut(&ErasedExpr))

Visit each expr in the table. Read more
Source§

fn visit_mut(&mut self, f: &mut impl FnMut(&mut ErasedExpr))

Visit each expr in the table, with a mutable reference. Read more
Source§

fn nullify(self) -> Self::Nullify

Source§

impl<'scope, T: TableMode, A, B> TableHKT for Two<'scope, T, A, B>
where A: Value, B: Value,

Source§

type Of<Mode: TableMode> = Two<'scope, Mode, A, B>

Replace the mode with another.
Source§

type Mode = T

The current mode of this table.
Source§

impl<A, B> TableLoaderSqlx for Two<'static, ExprMode, A, B>
where A: Value, B: Value,

Source§

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>>)

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>
where <Mode as TableMode>::T<'scope, A>: Freeze, <Mode as TableMode>::T<'scope, B>: Freeze,

§

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>
where <Mode as TableMode>::T<'scope, A>: Send, <Mode as TableMode>::T<'scope, B>: Send,

§

impl<'scope, Mode, A, B> Sync for Two<'scope, Mode, A, B>
where <Mode as TableMode>::T<'scope, A>: Sync, <Mode as TableMode>::T<'scope, B>: Sync,

§

impl<'scope, Mode, A, B> Unpin for Two<'scope, Mode, A, B>
where <Mode as TableMode>::T<'scope, A>: Unpin, <Mode as TableMode>::T<'scope, B>: Unpin,

§

impl<'scope, Mode, A, B> UnwindSafe for Two<'scope, Mode, A, B>
where <Mode as TableMode>::T<'scope, A>: UnwindSafe, <Mode as TableMode>::T<'scope, B>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more