pub struct RestoreOp { /* private fields */ }Expand description
Restores a soft-deleted record to its captured live content.
The full record uses the same strict wire mirrors as DeletePreimage.
See crates/khive-changeset/docs/api/restore.md for lifecycle semantics.
Implementations§
Source§impl RestoreOp
impl RestoreOp
Sourcepub fn new(target_id: Id128, record: DeletePreimage) -> Result<Self, String>
pub fn new(target_id: Id128, record: DeletePreimage) -> Result<Self, String>
Checks target identity, live state, and the embedded numeric invariants.
§Errors
Refuses a mismatched ID, a tombstoned record, a non-active note, or invalid numeric values.
Sourcepub fn record(&self) -> &DeletePreimage
pub fn record(&self) -> &DeletePreimage
The full expected live record, including captured lifecycle metadata.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RestoreOp
impl<'de> Deserialize<'de> for RestoreOp
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RestoreOp
impl RefUnwindSafe for RestoreOp
impl Send for RestoreOp
impl Sync for RestoreOp
impl Unpin for RestoreOp
impl UnsafeUnpin for RestoreOp
impl UnwindSafe for RestoreOp
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
Mutably borrows from an owned value. Read more