pub struct Change { /* private fields */ }Expand description
The first difference between two shapes.
First rather than all: a shape mismatch is usually one edit, and a list of every consequence of that edit is harder to read than the edit.
Implementations§
Source§impl Change
impl Change
Sourcepub const fn kind(&self) -> ChangeKind
pub const fn kind(&self) -> ChangeKind
What kind of difference this is.
Sourcepub fn owner(&self) -> &str
pub fn owner(&self) -> &str
The struct or enum the difference is in, empty when the type has no name of its own.
Sourcepub fn subject(&self) -> &str
pub fn subject(&self) -> &str
The field or variant the difference is about, empty when it is about a whole type.
Sourcepub const fn position(&self) -> Option<usize>
pub const fn position(&self) -> Option<usize>
The field or variant position, where the difference has one.
Sourcepub const fn is_additive(&self) -> bool
pub const fn is_additive(&self) -> bool
Whether this change can be read through without a migration.
Trait Implementations§
impl Eq for Change
impl StructuralPartialEq for Change
Auto Trait Implementations§
impl Freeze for Change
impl RefUnwindSafe for Change
impl Send for Change
impl Sync for Change
impl Unpin for Change
impl UnsafeUnpin for Change
impl UnwindSafe for Change
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