pub enum ConnectionSpec {
Url(Secret),
Parts {
host: String,
port: u16,
user: String,
password: Option<Secret>,
database: String,
},
}Expand description
How the source connection is specified: a full URL (literal or from env) or
the parts to assemble one. Resolution happens at runtime, so a configured
value can be overridden by SOURCE_URL_VAR in the running environment.
Variants§
Url(Secret)
A full connection URL.
Parts
The parts of a connection URL; password may come from the environment.
Trait Implementations§
Source§impl Clone for ConnectionSpec
impl Clone for ConnectionSpec
Source§fn clone(&self) -> ConnectionSpec
fn clone(&self) -> ConnectionSpec
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 Debug for ConnectionSpec
impl Debug for ConnectionSpec
Source§impl<'de> Deserialize<'de> for ConnectionSpec
impl<'de> Deserialize<'de> for ConnectionSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ConnectionSpec
impl RefUnwindSafe for ConnectionSpec
impl Send for ConnectionSpec
impl Sync for ConnectionSpec
impl Unpin for ConnectionSpec
impl UnsafeUnpin for ConnectionSpec
impl UnwindSafe for ConnectionSpec
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