pub trait TBuilder:
Sized
+ Send
+ Sync
+ 'static {
type Target: Send + Sync + 'static;
// Required methods
fn available_params() -> &'static [&'static str];
fn from_dsn<D: IntoDsn>(dsn: D) -> RawResult<Self>;
fn client_version() -> &'static str;
fn ping(&self, _: &mut Self::Target) -> RawResult<()>;
fn ready(&self) -> bool;
fn build(&self) -> RawResult<Self::Target>;
}
Expand description
A struct is Connectable
when it can be build from a Dsn
.
Required Associated Types§
Required Methods§
Sourcefn available_params() -> &'static [&'static str]
fn available_params() -> &'static [&'static str]
A list of parameters available in DSN.
Sourcefn from_dsn<D: IntoDsn>(dsn: D) -> RawResult<Self>
fn from_dsn<D: IntoDsn>(dsn: D) -> RawResult<Self>
Connect with dsn without connection checking.
Sourcefn client_version() -> &'static str
fn client_version() -> &'static str
Get client version.
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.