pub struct MssqlConnectOptions { /* private fields */ }Expand description
SQL Server connection options.
Implementations§
Source§impl MssqlConnectOptions
impl MssqlConnectOptions
Sourcepub fn parse_url(input: &str) -> Result<Self, MssqlInvalidOption>
pub fn parse_url(input: &str) -> Result<Self, MssqlInvalidOption>
Parses SQL Server connection options while preserving detailed parser errors.
Sourcepub fn trust_server_certificate(&self) -> bool
pub fn trust_server_certificate(&self) -> bool
Returns whether server certificate validation is bypassed.
Sourcepub fn hostname_in_certificate(&self) -> Option<&str>
pub fn hostname_in_certificate(&self) -> Option<&str>
Returns the hostname expected in the server certificate.
Sourcepub fn ssl_root_cert(&self) -> Option<&Path>
pub fn ssl_root_cert(&self) -> Option<&Path>
Returns the configured root certificate path.
Sourcepub fn requested_packet_size(&self) -> u32
pub fn requested_packet_size(&self) -> u32
Returns the requested TDS packet size.
Sourcepub fn client_program_version(&self) -> u32
pub fn client_program_version(&self) -> u32
Returns the client program version sent during login.
Sourcepub fn client_pid(&self) -> u32
pub fn client_pid(&self) -> u32
Returns the client process ID sent during login.
Sourcepub fn server_name(&self) -> &str
pub fn server_name(&self) -> &str
Returns the server name sent during login.
Sourcepub fn client_interface_name(&self) -> &str
pub fn client_interface_name(&self) -> &str
Returns the client interface name sent during login.
Trait Implementations§
Source§impl Clone for MssqlConnectOptions
impl Clone for MssqlConnectOptions
Source§fn clone(&self) -> MssqlConnectOptions
fn clone(&self) -> MssqlConnectOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ConnectOptions for MssqlConnectOptions
impl ConnectOptions for MssqlConnectOptions
type Connection = MssqlConnection
Source§async fn connect(&self) -> Result<Self::Connection, Error>where
Self::Connection: Sized,
async fn connect(&self) -> Result<Self::Connection, Error>where
Self::Connection: Sized,
Establish a new database connection with the options specified by
self.Source§fn log_statements(self, _level: LevelFilter) -> Self
fn log_statements(self, _level: LevelFilter) -> Self
Log executed statements with the specified
levelSource§fn log_slow_statements(self, _level: LevelFilter, _duration: Duration) -> Self
fn log_slow_statements(self, _level: LevelFilter, _duration: Duration) -> Self
Log executed statements with a duration above the specified
duration
at the specified level.Source§fn to_url_lossy(&self) -> Url
fn to_url_lossy(&self) -> Url
Get a connection URL that may be used to connect to the same database as this
ConnectOptions. Read moreSource§fn disable_statement_logging(self) -> Self
fn disable_statement_logging(self) -> Self
Entirely disables statement logging (both slow and regular).
Source§impl Debug for MssqlConnectOptions
impl Debug for MssqlConnectOptions
Source§impl Default for MssqlConnectOptions
impl Default for MssqlConnectOptions
Source§impl FromStr for MssqlConnectOptions
impl FromStr for MssqlConnectOptions
Source§impl PartialEq for MssqlConnectOptions
impl PartialEq for MssqlConnectOptions
Source§fn eq(&self, other: &MssqlConnectOptions) -> bool
fn eq(&self, other: &MssqlConnectOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<'a> TryFrom<&'a AnyConnectOptions> for MssqlConnectOptions
impl<'a> TryFrom<&'a AnyConnectOptions> for MssqlConnectOptions
impl Eq for MssqlConnectOptions
impl StructuralPartialEq for MssqlConnectOptions
Auto Trait Implementations§
impl Freeze for MssqlConnectOptions
impl RefUnwindSafe for MssqlConnectOptions
impl Send for MssqlConnectOptions
impl Sync for MssqlConnectOptions
impl Unpin for MssqlConnectOptions
impl UnsafeUnpin for MssqlConnectOptions
impl UnwindSafe for MssqlConnectOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more