pub struct TranslationPublication { /* private fields */ }Expand description
An admitted translation and exact filesystem inputs awaiting explicit publication.
Preparation writes nothing. Publication checks all input bytes again, stages every output beside its destination, and atomically replaces each file. An ordinary commit failure restores earlier destinations. This is not a cross-file crash-atomic transaction or a lock against concurrent editors. The input and existing cfg/backup are bounded to 4 MiB and must be regular files.
Implementations§
Source§impl TranslationPublication
impl TranslationPublication
Sourcepub const fn report(&self) -> &RewriteReport
pub const fn report(&self) -> &RewriteReport
The in-memory admission result; no writes have been performed.
Sourcepub fn publish(self) -> Result<RewriteReport, ApiError>
pub fn publish(self) -> Result<RewriteReport, ApiError>
Publishes all prepared outputs after checking that the source and existing destinations have not changed. Rejected translations perform no writes.
§Errors
An I/O error or DIVE-P0100 rejection, including a concurrent edit. A
rollback failure retains the original staging file and reports its path;
it never succeeds.