pub struct VersionControl { /* private fields */ }Expand description
Version control manager
Implementations§
Source§impl VersionControl
impl VersionControl
pub fn new(storage: FileStorage) -> Self
Sourcepub fn create_snapshot(
&self,
config: &ConfigEntry,
change_description: Option<String>,
) -> Result<VersionEntry>
pub fn create_snapshot( &self, config: &ConfigEntry, change_description: Option<String>, ) -> Result<VersionEntry>
Create a version snapshot of a configuration
Sourcepub fn get_history(
&self,
namespace: &str,
key: &str,
env: Environment,
) -> Result<Vec<VersionEntry>>
pub fn get_history( &self, namespace: &str, key: &str, env: Environment, ) -> Result<Vec<VersionEntry>>
Get version history
Sourcepub fn rollback(
&self,
namespace: &str,
key: &str,
env: Environment,
target_version: u64,
) -> Result<Option<ConfigEntry>>
pub fn rollback( &self, namespace: &str, key: &str, env: Environment, target_version: u64, ) -> Result<Option<ConfigEntry>>
Rollback to a specific version
Auto Trait Implementations§
impl Freeze for VersionControl
impl RefUnwindSafe for VersionControl
impl Send for VersionControl
impl Sync for VersionControl
impl Unpin for VersionControl
impl UnsafeUnpin for VersionControl
impl UnwindSafe for VersionControl
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