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,
) -> Config
pub fn with_defaults( store_id: String, device_id: String, store_name: String, ) -> Config
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§
Source§impl From<Config> for CovenConfig
impl From<Config> for CovenConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.