pub enum CopyTarget<'a> {
Db(&'a Db),
Tx(&'a mut Tx),
Connection(&'a mut PgConnection),
}Expand description
Where Model::copy_in runs: a pool (one connection is borrowed), a
transaction or a plain connection.
Variants§
Db(&'a Db)
A connection borrowed from the pool.
Tx(&'a mut Tx)
An open transaction.
Connection(&'a mut PgConnection)
A plain connection.
Trait Implementations§
Source§impl<'a> Debug for CopyTarget<'a>
impl<'a> Debug for CopyTarget<'a>
Source§impl<'a> From<&'a Db> for CopyTarget<'a>
impl<'a> From<&'a Db> for CopyTarget<'a>
Source§fn from(db: &'a Db) -> CopyTarget<'a>
fn from(db: &'a Db) -> CopyTarget<'a>
Converts to this type from the input type.
Source§impl<'a> From<&'a mut PgConnection> for CopyTarget<'a>
impl<'a> From<&'a mut PgConnection> for CopyTarget<'a>
Source§fn from(conn: &'a mut PgConnection) -> CopyTarget<'a>
fn from(conn: &'a mut PgConnection) -> CopyTarget<'a>
Converts to this type from the input type.
Source§impl<'a> From<&'a mut Tx> for CopyTarget<'a>
impl<'a> From<&'a mut Tx> for CopyTarget<'a>
Source§fn from(tx: &'a mut Tx) -> CopyTarget<'a>
fn from(tx: &'a mut Tx) -> CopyTarget<'a>
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for CopyTarget<'a>
impl<'a> !UnwindSafe for CopyTarget<'a>
impl<'a> Freeze for CopyTarget<'a>
impl<'a> Send for CopyTarget<'a>
impl<'a> Sync for CopyTarget<'a>
impl<'a> Unpin for CopyTarget<'a>
impl<'a> UnsafeUnpin for CopyTarget<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<M> InScope<(M, ()), Here> for M
impl<M, Rest, N> InScope<(M, (Rest, N)), Last> for N
impl<X, M, Rest, N, I> InScope<(M, (Rest, N)), There<I>> for X
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