[−][src]Struct suggestor::web::ToolsDb
Implementations
impl ToolsDb
[src]
pub fn fairing() -> impl Fairing
[src]
Returns a fairing that initializes the associated database connection pool.
pub async fn get_one<'_>(__rocket: &'_ Rocket) -> Option<Self>
[src]
Retrieves a connection of type Self
from the rocket
instance. Returns Some
as long as Self::fairing()
has been
attached.
pub async fn run<F, R, '_>(&'_ self, __f: F) -> R where
F: FnOnce(&mut MysqlConnection) -> R + Send + 'static,
R: Send + 'static,
[src]
F: FnOnce(&mut MysqlConnection) -> R + Send + 'static,
R: Send + 'static,
Runs the provided closure on a thread from a threadpool. The
closure will be passed an &mut r2d2::PooledConnection
.
.await
ing the return value of this function yields the value
returned by the closure.
Trait Implementations
impl<'a, 'r> FromRequest<'a, 'r> for ToolsDb
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ToolsDb
impl Send for ToolsDb
impl Sync for ToolsDb
impl Unpin for ToolsDb
impl !UnwindSafe for ToolsDb
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoCollection<T> for T
pub fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
A: Array<Item = T>,
pub fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
A: Array<Item = U>,
F: FnMut(T) -> U,
impl<T> IntoSql for T
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
&'a Self: AsExpression<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,