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 Forget for RestoreOp
impl Freeze for RestoreOpwhere
*const EntityRecord is !null: Freeze,
PhantomData<EntityRecord>: Freeze,
*const Note is !null: Freeze,
PhantomData<Note>: Freeze,
*const Link is !null: Freeze,
PhantomData<Link>: Freeze,
impl Move for RestoreOp
impl RefUnwindSafe for RestoreOp
impl Send for RestoreOp
impl Sync for RestoreOp
impl Unpin for RestoreOp
impl UnsafeUnpin for RestoreOpwhere
*const EntityRecord is !null: UnsafeUnpin,
PhantomData<EntityRecord>: UnsafeUnpin,
*const Note is !null: UnsafeUnpin,
PhantomData<Note>: UnsafeUnpin,
*const Link is !null: UnsafeUnpin,
PhantomData<Link>: UnsafeUnpin,
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