pub struct Config { /* private fields */ }Expand description
Configuration struct that contains information needed for Database.
Implementations§
source§impl Config
impl Config
sourcepub fn new() -> Result<Config, VarError>
pub fn new() -> Result<Config, VarError>
Creating new Config struct with default configuration.
With a possibility of std::env::VarError due to enviroment variable isn’t exists.
If that happens, You should use Config::new_custom_url for defining your own database URL instead.
sourcepub fn new_custom_url(url: String) -> Config
pub fn new_custom_url(url: String) -> Config
Creating a new Config struct with custom URL configuration
This function also checks if the url parameter is kv.replit.com or not
Auto Trait Implementations§
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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