pub trait ConnectOptions:
'static
+ Send
+ Sync
+ FromStr<Err = Error>
+ Debug
+ Clone {
type Connection: Connection + ?Sized;
// Required methods
fn from_url(url: &Url) -> Result<Self, Error>;
fn connect(&self) -> BoxFuture<'_, Result<Self::Connection, Error>>
where Self::Connection: Sized;
}Required Associated Types§
type Connection: Connection + ?Sized
Required Methods§
Sourcefn connect(&self) -> BoxFuture<'_, Result<Self::Connection, Error>>where
Self::Connection: Sized,
fn connect(&self) -> BoxFuture<'_, Result<Self::Connection, Error>>where
Self::Connection: Sized,
Establish a new database connection with the options specified by self.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.