pub struct MigrationPlan {
pub path: String,
pub from_version: ConfigVersion,
pub content: Vec<u8>,
}Expand description
A computed, in-memory upgrade of a config file to the latest format,
produced by plan_migration without touching disk.
Fields§
§path: String§from_version: ConfigVersion§content: Vec<u8>Implementations§
Source§impl MigrationPlan
impl MigrationPlan
Sourcepub fn write(
&self,
opts: Option<MigrationOptions>,
) -> Result<MigrationResult, ConfigError>
pub fn write( &self, opts: Option<MigrationOptions>, ) -> Result<MigrationResult, ConfigError>
Commits the planned upgrade to disk in place (with a backup unless disabled) and returns the outcome.
Trait Implementations§
Source§impl Clone for MigrationPlan
impl Clone for MigrationPlan
Source§fn clone(&self) -> MigrationPlan
fn clone(&self) -> MigrationPlan
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 moreAuto Trait Implementations§
impl Freeze for MigrationPlan
impl RefUnwindSafe for MigrationPlan
impl Send for MigrationPlan
impl Sync for MigrationPlan
impl Unpin for MigrationPlan
impl UnsafeUnpin for MigrationPlan
impl UnwindSafe for MigrationPlan
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