pub struct NativeTreeMaterializationBackend { /* private fields */ }Expand description
Native same-volume tree publisher used for root checkout application.
Callers first materialize the exact target generation into target. The
operation directory may be a sibling of the checkout so no repository
marker is required, but it must not be the checkout, an ancestor, or a
descendant. Each
top-level binding is then exchanged with the live root independently. The
displaced live binding remains in backup until the journal is terminal,
preserving metadata, sparse allocation, links, and hard-link identity for
rollback without re-encoding host state.
Implementations§
Source§impl NativeTreeMaterializationBackend
impl NativeTreeMaterializationBackend
Sourcepub fn new(
root: impl Into<PathBuf>,
operation_directory: impl Into<PathBuf>,
) -> Result<Self, NativeTreeMaterializationError>
pub fn new( root: impl Into<PathBuf>, operation_directory: impl Into<PathBuf>, ) -> Result<Self, NativeTreeMaterializationError>
Binds an existing checkout root and same-volume operation directory.
operation_directory/target must contain the fully materialized target
tree; operation_directory/backup is owned by this backend.
Trait Implementations§
Source§impl MaterializationBackend for NativeTreeMaterializationBackend
Available on non-WebAssembly only.
impl MaterializationBackend for NativeTreeMaterializationBackend
Source§type Error = NativeTreeMaterializationError
type Error = NativeTreeMaterializationError
Source§async fn capture(
&self,
edit: &MaterializationEdit,
) -> Result<MaterializationPreimage, Self::Error>
async fn capture( &self, edit: &MaterializationEdit, ) -> Result<MaterializationPreimage, Self::Error>
Source§async fn observe(
&self,
edit: &MaterializationEdit,
preimage: &MaterializationPreimage,
) -> Result<MaterializationObservation, Self::Error>
async fn observe( &self, edit: &MaterializationEdit, preimage: &MaterializationPreimage, ) -> Result<MaterializationObservation, Self::Error>
Source§async fn apply(
&self,
edit: &MaterializationEdit,
preimage: &MaterializationPreimage,
) -> Result<(), Self::Error>
async fn apply( &self, edit: &MaterializationEdit, preimage: &MaterializationPreimage, ) -> Result<(), Self::Error>
Source§async fn restore(
&self,
edit: &MaterializationEdit,
preimage: &MaterializationPreimage,
) -> Result<(), Self::Error>
async fn restore( &self, edit: &MaterializationEdit, preimage: &MaterializationPreimage, ) -> Result<(), Self::Error>
Source§fn verify_source(
&self,
_from: GenerationId,
) -> impl Future<Output = Result<bool, Self::Error>> + Send
fn verify_source( &self, _from: GenerationId, ) -> impl Future<Output = Result<bool, Self::Error>> + Send
Auto Trait Implementations§
impl Freeze for NativeTreeMaterializationBackend
impl RefUnwindSafe for NativeTreeMaterializationBackend
impl Send for NativeTreeMaterializationBackend
impl Sync for NativeTreeMaterializationBackend
impl Unpin for NativeTreeMaterializationBackend
impl UnsafeUnpin for NativeTreeMaterializationBackend
impl UnwindSafe for NativeTreeMaterializationBackend
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request