pub trait RestoreHooks: Sync {
// Provided methods
fn check_patch(
&self,
id: &Id,
patch: Option<&PatchObject>,
) -> Result<(), Box<SetError>> { ... }
fn same_type_references(
&self,
final_version: &Map<String, Value>,
) -> Vec<Id> { ... }
}Expand description
Per-type hooks for run_restore_phase.
Provided Methods§
Sourcefn check_patch(
&self,
id: &Id,
patch: Option<&PatchObject>,
) -> Result<(), Box<SetError>>
fn check_patch( &self, id: &Id, patch: Option<&PatchObject>, ) -> Result<(), Box<SetError>>
Check a restore entry’s patch as the type checks an update patch
(#creationId references, metadata entries, …). The default
accepts it.
§Errors
The entry’s SetError.
Sourcefn same_type_references(&self, final_version: &Map<String, Value>) -> Vec<Id>
fn same_type_references(&self, final_version: &Map<String, Value>) -> Vec<Id>
The ids of objects of the same type that final_version refers to
(a Mailbox’s or FileNode’s parentId). Restores that refer to
another restore key run after it (-04 §5.1: “as for creates”). The
default: none, so restores run in key order.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".