pub struct LoadOptions {
pub refresh: Option<Duration>,
pub cache_dir: Option<PathBuf>,
}Expand description
How a client loads and refreshes its config.
Fields§
§refresh: Option<Duration>How often to re-read the source and apply changes. None loads
once and never reloads.
cache_dir: Option<PathBuf>Where remote configs are cached. None disables the cache.
Implementations§
Source§impl LoadOptions
impl LoadOptions
Sourcepub fn from_env() -> Result<Self, SignalError>
pub fn from_env() -> Result<Self, SignalError>
Defaults, overridden by $SIGNAL_CONFIG_REFRESH_SECS (0 turns
reloading off) and $SIGNAL_CONFIG_CACHE_DIR.
Sourcepub fn cache_path(&self, source: &ConfigSource) -> Option<PathBuf>
pub fn cache_path(&self, source: &ConfigSource) -> Option<PathBuf>
Where the cached copy of source lives, if it is remote and
caching is on.
Trait Implementations§
Source§impl Clone for LoadOptions
impl Clone for LoadOptions
Source§fn clone(&self) -> LoadOptions
fn clone(&self) -> LoadOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LoadOptions
impl Debug for LoadOptions
Auto Trait Implementations§
impl Freeze for LoadOptions
impl RefUnwindSafe for LoadOptions
impl Send for LoadOptions
impl Sync for LoadOptions
impl Unpin for LoadOptions
impl UnsafeUnpin for LoadOptions
impl UnwindSafe for LoadOptions
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