Working statement preparation
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
use std::error::Error;
|
||||
use std::mem;
|
||||
use std::path::PathBuf;
|
||||
use std::str::FromStr;
|
||||
use std::time::Duration;
|
||||
|
||||
use error;
|
||||
use params::url::Url;
|
||||
|
||||
mod url;
|
||||
@@ -96,6 +98,14 @@ impl ConnectParams {
|
||||
}
|
||||
}
|
||||
|
||||
impl FromStr for ConnectParams {
|
||||
type Err = error::Error;
|
||||
|
||||
fn from_str(s: &str) -> Result<ConnectParams, error::Error> {
|
||||
s.into_connect_params().map_err(error::connect)
|
||||
}
|
||||
}
|
||||
|
||||
/// A builder for `ConnectParams`.
|
||||
pub struct Builder {
|
||||
port: u16,
|
||||
|
||||
Reference in New Issue
Block a user