pub struct MigrateReport {
pub package: PathBuf,
pub schema: String,
pub files: Vec<FileMigration>,
pub legacy_polarity: bool,
pub required_added: Vec<BareField>,
}Expand description
The computed migration of one package. Computing never writes;
write_migration applies it.
Fields§
§package: PathBuf§schema: Stringname@version from the manifest.
files: Vec<FileMigration>Every type file, in stem order; files without rewrites carry an
empty rewrites and their original text.
legacy_polarity: boolWhether the package was read as pre-flip content (it carries the
retired optional: key), which is what made required_added
non-empty.
required_added: Vec<BareField>See BareField. Empty unless legacy_polarity.
Implementations§
Source§impl MigrateReport
impl MigrateReport
pub fn rewrite_count(&self) -> usize
pub fn is_noop(&self) -> bool
Sourcepub fn changed_files(&self) -> impl Iterator<Item = &FileMigration>
pub fn changed_files(&self) -> impl Iterator<Item = &FileMigration>
The files that actually change.
Trait Implementations§
Source§impl Clone for MigrateReport
impl Clone for MigrateReport
Source§fn clone(&self) -> MigrateReport
fn clone(&self) -> MigrateReport
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 MigrateReport
impl RefUnwindSafe for MigrateReport
impl Send for MigrateReport
impl Sync for MigrateReport
impl Unpin for MigrateReport
impl UnsafeUnpin for MigrateReport
impl UnwindSafe for MigrateReport
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