pub struct FileParamStore { /* private fields */ }Expand description
Hosted ParamStore persisting scalar parameter overrides to a text
file: one name<TAB>kind<TAB>value line per scalar parameter (kind ∈
b/i/d/s). Arrays and NotSet are not persisted; names or values
containing a tab or newline are skipped (they would corrupt the line
format). Writes are atomic (temp file + rename).
Implementations§
Trait Implementations§
Source§impl Clone for FileParamStore
impl Clone for FileParamStore
Source§fn clone(&self) -> FileParamStore
fn clone(&self) -> FileParamStore
Returns a duplicate of the value. Read more
1.0.0 · 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 FileParamStore
impl Debug for FileParamStore
Source§impl ParamStore for FileParamStore
impl ParamStore for FileParamStore
Source§fn load(&self, apply: &mut dyn FnMut(&str, ParameterValue))
fn load(&self, apply: &mut dyn FnMut(&str, ParameterValue))
Apply each persisted
(name, value) via apply. Called once at boot
after defaults are declared, so persisted values override them.Source§fn save(
&mut self,
params: &mut dyn Iterator<Item = (&str, &ParameterValue)>,
) -> Result<(), ParamStoreError>
fn save( &mut self, params: &mut dyn Iterator<Item = (&str, &ParameterValue)>, ) -> Result<(), ParamStoreError>
Persist the full current parameter set.
params yields (name, value)
for every declared parameter; called after a runtime set changes a
value. Non-scalar values (arrays, NotSet) are backend-defined and may
be skipped.Auto Trait Implementations§
impl Freeze for FileParamStore
impl RefUnwindSafe for FileParamStore
impl Send for FileParamStore
impl Sync for FileParamStore
impl Unpin for FileParamStore
impl UnsafeUnpin for FileParamStore
impl UnwindSafe for FileParamStore
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