pub struct StagedEdit<'a, T: Clone> { /* private fields */ }Expand description
An isolated candidate for one atomic module edit.
Implementations§
Source§impl<T: Clone> StagedEdit<'_, T>
impl<T: Clone> StagedEdit<'_, T>
pub const fn value(&self) -> &T
pub const fn value_mut(&mut self) -> &mut T
pub fn diagnostics(&self) -> &[Diagnostic]
Sourcepub fn add_diagnostic(&mut self, diagnostic: Diagnostic) -> Result<(), Error>
pub fn add_diagnostic(&mut self, diagnostic: Diagnostic) -> Result<(), Error>
Add a finding to the candidate under the normal module record checks.
Sourcepub fn commit(
self,
producer: Producer,
history: HistoryEntry,
) -> Result<(), Error>
pub fn commit( self, producer: Producer, history: HistoryEntry, ) -> Result<(), Error>
Validate and atomically replace the original module with this candidate. A committed edit keeps source descriptors and prior records, but invalidates retained bytes and source mappings that describe the pre-edit value.
Auto Trait Implementations§
impl<'a, T> !UnwindSafe for StagedEdit<'a, T>
impl<'a, T> Freeze for StagedEdit<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for StagedEdit<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for StagedEdit<'a, T>where
T: Send,
impl<'a, T> Sync for StagedEdit<'a, T>where
T: Sync,
impl<'a, T> Unpin for StagedEdit<'a, T>where
T: Unpin,
impl<'a, T> UnsafeUnpin for StagedEdit<'a, T>where
T: UnsafeUnpin,
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