pub struct StagedEdit<'a, T>where
T: Clone,{ /* private fields */ }Expand description
The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. An isolated candidate for one atomic module edit.
Implementations§
Source§impl<T> StagedEdit<'_, T>where
T: Clone,
impl<T> StagedEdit<'_, T>where
T: Clone,
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§
impl<T> Allocation for T
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