pub enum MaybePoolConnection<'c, DB>where
DB: Database,{
Connection(&'c mut <DB as Database>::Connection),
PoolConnection(PoolConnection<DB>),
}Variantsยง
Connection(&'c mut <DB as Database>::Connection)
PoolConnection(PoolConnection<DB>)
Trait Implementationsยง
Sourceยงimpl<DB> Deref for MaybePoolConnection<'_, DB>where
DB: Database,
impl<DB> Deref for MaybePoolConnection<'_, DB>where
DB: Database,
Sourceยงimpl<DB> DerefMut for MaybePoolConnection<'_, DB>where
DB: Database,
impl<DB> DerefMut for MaybePoolConnection<'_, DB>where
DB: Database,
Sourceยงimpl<'c, DB> From<&'c mut <DB as Database>::Connection> for MaybePoolConnection<'c, DB>where
DB: Database,
impl<'c, DB> From<&'c mut <DB as Database>::Connection> for MaybePoolConnection<'c, DB>where
DB: Database,
Sourceยงfn from(v: &'c mut <DB as Database>::Connection) -> MaybePoolConnection<'c, DB>
fn from(v: &'c mut <DB as Database>::Connection) -> MaybePoolConnection<'c, DB>
Converts to this type from the input type.
Sourceยงimpl<DB> From<PoolConnection<DB>> for MaybePoolConnection<'_, DB>where
DB: Database,
impl<DB> From<PoolConnection<DB>> for MaybePoolConnection<'_, DB>where
DB: Database,
Sourceยงfn from(v: PoolConnection<DB>) -> MaybePoolConnection<'_, DB>
fn from(v: PoolConnection<DB>) -> MaybePoolConnection<'_, DB>
Converts to this type from the input type.
Auto Trait Implementationsยง
impl<'c, DB> Freeze for MaybePoolConnection<'c, DB>
impl<'c, DB> !RefUnwindSafe for MaybePoolConnection<'c, DB>
impl<'c, DB> Send for MaybePoolConnection<'c, DB>
impl<'c, DB> Sync for MaybePoolConnection<'c, DB>
impl<'c, DB> Unpin for MaybePoolConnection<'c, DB>
impl<'c, DB> UnsafeUnpin for MaybePoolConnection<'c, DB>
impl<'c, DB> !UnwindSafe for MaybePoolConnection<'c, DB>
Blanket Implementationsยง
Sourceยงimpl<R> TryRngCore for Rwhere
R: TryRng,
impl<R> TryRngCore for Rwhere
R: TryRng,
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 moreSourceยงimpl<R> RngExt for R
impl<R> RngExt for R
Sourceยงfn random<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
fn random<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
Return a random value via the
StandardUniform distribution. Read moreSourceยงfn random_iter<T>(self) -> Iter<StandardUniform, Self, T>
fn random_iter<T>(self) -> Iter<StandardUniform, Self, T>
Sourceยงfn random_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
fn random_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
Generate a random value in the given range. Read more
Sourceยงfn random_bool(&mut self, p: f64) -> bool
fn random_bool(&mut self, p: f64) -> bool
Return a bool with a probability
p of being true. Read moreSourceยงfn random_ratio(&mut self, numerator: u32, denominator: u32) -> bool
fn random_ratio(&mut self, numerator: u32, denominator: u32) -> bool
Return a bool with a probability of
numerator/denominator of being
true. Read moreSourceยงfn sample<T, D>(&mut self, distr: D) -> Twhere
D: Distribution<T>,
fn sample<T, D>(&mut self, distr: D) -> Twhere
D: Distribution<T>,
Sample a new value, using the given distribution. Read more
Sourceยงfn sample_iter<T, D>(self, distr: D) -> Iter<D, Self, T>where
D: Distribution<T>,
Self: Sized,
fn sample_iter<T, D>(self, distr: D) -> Iter<D, Self, T>where
D: Distribution<T>,
Self: Sized,
Create an iterator that generates values using the given distribution. Read more