pub struct Config {
pub store_id: String,
pub device_id: String,
pub store_name: String,
pub cloud_home: CloudHomeConfig,
}Expand description
Sync + storage configuration for one store.
Fields§
§store_id: String§device_id: StringUnique device identifier for sync changeset namespacing.
store_name: String§cloud_home: CloudHomeConfigCloud home provider + its settings.
Implementations§
Source§impl Config
impl Config
Sourcepub fn with_defaults(
store_id: String,
device_id: String,
store_name: String,
) -> Self
pub fn with_defaults( store_id: String, device_id: String, store_name: String, ) -> Self
Construct a config with defaults for a new or joined store.
Sourcepub fn save_to_config_yaml(
&self,
store_dir: &StoreDir,
) -> Result<(), ConfigError>
pub fn save_to_config_yaml( &self, store_dir: &StoreDir, ) -> Result<(), ConfigError>
Persist the sync config to store_dir/config.yaml.
Sourcepub fn load_from_config_yaml(
store_dir: &StoreDir,
) -> Result<Config, ConfigError>
pub fn load_from_config_yaml( store_dir: &StoreDir, ) -> Result<Config, ConfigError>
Read store_dir/config.yaml back into a runtime Config. A missing or
unparseable file is a loud ConfigError naming the path.
Trait Implementations§
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin 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