pub enum Evolution {
InitialVersion,
FieldAdded {
name: String,
},
FieldMadeOptional {
name: String,
},
FieldRemoved {
name: String,
},
FieldMadeTransient {
name: String,
},
}Variants§
InitialVersion
FieldAdded
Add a new field to a struct.
New version can still read the old with the use of default. Old version can only read if the type is Option<T> and the value is None.
FieldMadeOptional
Existing non-option field is made optional.
New version can read old data by wrapping with Some. Old version can read new data if it is not None.
FieldRemoved
Field removed from a struct.
New version can read old data by skipping the field. Old version can read new data only if it was Option<T>.
FieldMadeTransient
Field made transient.
An alias for FieldRemoved.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Evolution
impl RefUnwindSafe for Evolution
impl Send for Evolution
impl Sync for Evolution
impl Unpin for Evolution
impl UnsafeUnpin for Evolution
impl UnwindSafe for Evolution
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