#[non_exhaustive]pub struct DoConnectOptions;Expand description
The options type sqlx requires of every connection.
It parses do:// so the type is constructible, but
connect always fails: a connection comes from
a Durable Object’s storage, which only the object itself holds. Use
DoConnection::new.
Non-exhaustive, so parsing is the only way to get one – as sqlx itself does – and a field can be added without breaking anyone.
Trait Implementations§
Source§impl Clone for DoConnectOptions
impl Clone for DoConnectOptions
Source§impl ConnectOptions for DoConnectOptions
impl ConnectOptions for DoConnectOptions
type Connection = DoConnection
Source§fn to_url_lossy(&self) -> Url
fn to_url_lossy(&self) -> Url
Get a connection URL that may be used to connect to the same database as this
ConnectOptions. Read moreSource§fn connect(
&self,
) -> impl Future<Output = Result<DoConnection, Error>> + Send + '_
fn connect( &self, ) -> impl Future<Output = Result<DoConnection, Error>> + Send + '_
Establish a new database connection with the options specified by
self.Source§fn log_statements(self, _level: LevelFilter) -> Self
fn log_statements(self, _level: LevelFilter) -> Self
Log executed statements with the specified
levelSource§fn log_slow_statements(self, _level: LevelFilter, _duration: Duration) -> Self
fn log_slow_statements(self, _level: LevelFilter, _duration: Duration) -> Self
Log executed statements with a duration above the specified
duration
at the specified level.Source§fn disable_statement_logging(self) -> Self
fn disable_statement_logging(self) -> Self
Entirely disables statement logging (both slow and regular).
Source§impl Debug for DoConnectOptions
impl Debug for DoConnectOptions
impl Eq for DoConnectOptions
Source§impl FromStr for DoConnectOptions
impl FromStr for DoConnectOptions
Source§impl PartialEq for DoConnectOptions
impl PartialEq for DoConnectOptions
impl StructuralPartialEq for DoConnectOptions
Auto Trait Implementations§
impl Freeze for DoConnectOptions
impl RefUnwindSafe for DoConnectOptions
impl Send for DoConnectOptions
impl Sync for DoConnectOptions
impl Unpin for DoConnectOptions
impl UnsafeUnpin for DoConnectOptions
impl UnwindSafe for DoConnectOptions
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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