pub struct RootAccessChange { /* private fields */ }Expand description
A RootAccessSummary plus what it would take to undo.
The task requires directory and ACL work to be “transactional where current
service installation rollback supports it”. service install already rolls
back a registration when the record cannot be written, so this is the same
idea for the two effects this module has:
- a directory this call created can be removed again, and
- a descriptor this call replaced can be written back, because the previous one was read first and kept.
What cannot be undone is a directory that was already there — and, per the
same requirement, that is reported rather than pretended about. See
Reversal.
Implementations§
Source§impl RootAccessChange
impl RootAccessChange
Sourcepub const fn not_applicable() -> Self
pub const fn not_applicable() -> Self
The nothing that happens on a platform without this problem.
Sourcepub const fn summary(&self) -> &RootAccessSummary
pub const fn summary(&self) -> &RootAccessSummary
What happened, in a form a command can print.
Sourcepub fn revert(&self) -> Reversal
pub fn revert(&self) -> Reversal
Undoes as much of this change as can be undone, and says what could not be.
Deliberately infallible in the type: a rollback runs while another
failure is already being reported, and a rollback that could itself
return Err would either hide that failure or replace it. The
Reversal says what happened and the caller folds it into the message
it was already writing.
Trait Implementations§
Source§impl Clone for RootAccessChange
impl Clone for RootAccessChange
Source§fn clone(&self) -> RootAccessChange
fn clone(&self) -> RootAccessChange
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more