ConnectOptions

Trait ConnectOptions 

Source
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§

Required Methods§

Source

fn from_url(url: &Url) -> Result<Self, Error>

Parse the ConnectOptions from a URL.

Source

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.

Implementors§