Struct shuttle_service::DatabaseInfo
source · 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, ) -> DatabaseInfo
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<DatabaseInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DatabaseInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for DatabaseInfo
impl Serialize for DatabaseInfo
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. 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