pub struct DatabaseInfo { /* private fields */ }
Expand description
Holds the data for building a database connection string.
Use Self::connection_string_shuttle
when running on Shuttle,
otherwise Self::connection_string_public
for the public URI.
Implementations§
Source§impl DatabaseInfo
impl DatabaseInfo
pub fn new( engine: String, role_name: String, role_password: String, database_name: String, port: String, hostname_shuttle: String, hostname_public: String, ) -> Self
Sourcepub fn connection_string_shuttle(&self) -> String
pub fn connection_string_shuttle(&self) -> String
For connecting to the db from inside the Shuttle network
Sourcepub fn connection_string_public(&self, show_password: bool) -> String
pub fn connection_string_public(&self, show_password: bool) -> String
For connecting to the db from the Internet
pub fn role_name(&self) -> String
pub fn database_name(&self) -> String
Trait Implementations§
Source§impl Clone for DatabaseInfo
impl Clone for DatabaseInfo
Source§fn clone(&self) -> DatabaseInfo
fn clone(&self) -> DatabaseInfo
Returns a copy of the value. Read more
1.0.0 · 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 DatabaseInfo
impl Debug for DatabaseInfo
Source§impl<'de> Deserialize<'de> for DatabaseInfo
impl<'de> Deserialize<'de> for DatabaseInfo
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 DatabaseInfo
impl RefUnwindSafe for DatabaseInfo
impl Send for DatabaseInfo
impl Sync for DatabaseInfo
impl Unpin for DatabaseInfo
impl UnwindSafe for DatabaseInfo
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)