pub struct DatastoreConfig {
pub cache_dir: Option<PathBuf>,
pub mirror: Option<String>,
pub mirror_region: Option<String>,
pub allow_upstream: Option<bool>,
pub offline: Option<bool>,
pub cache_max: Option<u64>,
pub credentials: Vec<CredentialConfig>,
pub services: BTreeMap<String, ServiceConfig>,
}Fields§
§cache_dir: Option<PathBuf>§mirror: Option<String>§mirror_region: Option<String>§allow_upstream: Option<bool>§offline: Option<bool>§cache_max: Option<u64>§credentials: Vec<CredentialConfig>§services: BTreeMap<String, ServiceConfig>Implementations§
Source§impl DatastoreConfig
impl DatastoreConfig
pub fn from_env() -> Result<Self>
pub fn from_path(path: &Path) -> Result<Self>
pub fn from_toml_str(text: &str) -> Result<Self>
pub fn to_toml_string(&self) -> Result<String>
Sourcepub fn builder(&self) -> Result<DatastoreBuilder>
pub fn builder(&self) -> Result<DatastoreBuilder>
Apply environment overrides, then this file. Credentials remain lazy.
pub fn builder_for_service(&self, name: &str) -> Result<DatastoreBuilder>
Trait Implementations§
Source§impl Clone for DatastoreConfig
impl Clone for DatastoreConfig
Source§impl Debug for DatastoreConfig
impl Debug for DatastoreConfig
Source§impl Default for DatastoreConfig
impl Default for DatastoreConfig
Source§impl<'de> Deserialize<'de> for DatastoreConfig
impl<'de> Deserialize<'de> for DatastoreConfig
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 DatastoreConfig
impl RefUnwindSafe for DatastoreConfig
impl Send for DatastoreConfig
impl Sync for DatastoreConfig
impl Unpin for DatastoreConfig
impl UnsafeUnpin for DatastoreConfig
impl UnwindSafe for DatastoreConfig
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