pub fn new<T: Into<String>>(uri: T) -> SqlIdentityBuilder {
        let uri: String = uri.into();
        let variant = SqlIdentityBuilder::variant(&uri);

        SqlIdentityBuilder {
            pool: DEFAULT_POOL_SIZE,
            uri: uri,
            hdr: DEFAULT_RESPONSE_HDR,
            variant: variant,
        }
    }
/// Creates a new SqlIdentityBuilder that constructs a SqlIdentityPolicy
///
/// # Arguments
///
/// * `uri` - Database connection string
///
/// # Example
///
/// ```no_run
/// # extern crate actix_web;
/// # extern crate actix_web_sql_identity;
///
/// use actix_web::App;
/// use actix_web::middleware::identity::IdentityService;
/// use actix_web_sql_identity::SqlIdentityBuilder;
///
/// // Create the identity policy
/// let policy = SqlIdentityBuilder::new("postgres://user:pass@host/database")
///                 .pool_size(5)
///                 .response_header("X-MY-RESPONSE")
///                 .finish()
///                 .expect("failed to open database");
///
/// let app = App::new().middleware(IdentityService::new(
///     policy
/// ));
/// ```
Creates a new SqlIdentityBuilder that constructs a SqlIdentityPolicy
Creates a new SqlIdentityBuilder that constructs a SqlIdentityPolicy
pub fn new<T: Into<String>>(uri: T) -> SqlIdentityBuilder {
        let uri: String = uri.into();
        let variant = SqlIdentityBuilder::variant(&uri);
        SqlIdentityBuilder {
            pool: DEFAULT_POOL_SIZE,
            uri: uri,
            hdr: DEFAULT_RESPONSE_HDR,
            variant: variant,
        }
    }
pub fn new < T : Into < String > > ( uri : T ) -> SqlIdentityBuilder { let uri : String = uri . into ( ) ; let variant = SqlIdentityBuilder :: variant ( & uri ) ; SqlIdentityBuilder { pool : DEFAULT_POOL_SIZE , uri : uri , hdr : DEFAULT_RESPONSE_HDR , variant : variant , } }
Creates a new SqlIdentityBuilder that constructs a SqlIdentityPolicy
Creates a new SqlIdentityBuilder that constructs a SqlIdentityPolicy
uri
T
uri
T
example
None
extern crate actix_web;
None
extern crate actix_web_sql_identity;


Create the identity policy
let policy = SqlIdentityBuilder::new("postgres://user:pass@host/database")
.pool_size(5)
.response_header("X-MY-RESPONSE")
.finish()
.expect("failed to open database").

let app = App::new().middleware(IdentityService::new(
policy
));
```
Create the identity policy let policy = SqlIdentityBuilder :: new ( " postgres : // user : pass@host / database " ) . pool_size ( 5 ) . response_header ( " X - MY - RESPONSE " ) . finish () . expect ( " failed to open database " ) . let app = App :: new () . middleware ( IdentityService :: new ( policy )) ; ` ` `