Struct postgres_shared::params::Builder [−][src]
pub struct Builder { /* fields omitted */ }
A builder for ConnectParams
.
Methods
impl Builder
[src]
impl Builder
pub fn new() -> Builder
[src]
pub fn new() -> Builder
Creates a new builder.
pub fn port(&mut self, port: u16) -> &mut Builder
[src]
pub fn port(&mut self, port: u16) -> &mut Builder
Sets the port.
pub fn user(&mut self, name: &str, password: Option<&str>) -> &mut Builder
[src]
pub fn user(&mut self, name: &str, password: Option<&str>) -> &mut Builder
Sets the user.
pub fn database(&mut self, database: &str) -> &mut Builder
[src]
pub fn database(&mut self, database: &str) -> &mut Builder
Sets the database.
pub fn option(&mut self, name: &str, value: &str) -> &mut Builder
[src]
pub fn option(&mut self, name: &str, value: &str) -> &mut Builder
Adds a runtime parameter.
pub fn connect_timeout(
&mut self,
connect_timeout: Option<Duration>
) -> &mut Builder
[src]
pub fn connect_timeout(
&mut self,
connect_timeout: Option<Duration>
) -> &mut Builder
Sets the connection timeout.
pub fn build(&mut self, host: Host) -> ConnectParams
[src]
pub fn build(&mut self, host: Host) -> ConnectParams
Constructs a ConnectParams
from the builder.