Skip to main content

RetiredSource

Struct RetiredSource 

Source
pub struct RetiredSource<M: Memory = DefaultMemoryImpl> { /* private fields */ }
Expand description

Exclusive cleanup authority for an entire source collection retired by cutover. Admission binds the exact transition and both database incarnations. Cleanup never opens the target and never clears the source’s retired manifest.

Implementations§

Source§

impl<M: Memory> RetiredSource<M>

Source

pub fn resume( memory: RuntimeMemory<M>, expected: &SchemaTransition, source_incarnation: [u8; 16], target_incarnation: [u8; 16], ) -> Result<Self, Error>

Admit only the expected retired allocation, without decoding historical rows. The host decides when preservation/recovery obligations permit deletion.

§Errors

Refuses live, copying, cancelled, foreign or malformed allocations intact.

§Panics

Supplier corruption traps without repair.

Source

pub fn cleanup_step(&mut self, limit: usize) -> Result<bool, Error>

Delete at most 1..=32 retired entries, preserving the ownership manifest. Return true when only that manifest remains. Repeated completion is a no-op. Deletion itself records progress; no additional cursor or phase is stored. This does not shrink physical memory, reset the allocation or reopen source.

§Errors

Refuses invalid limits before mutation.

§Panics

Supplier mutation failures trap; the IC rolls back the whole cleanup chunk.

Auto Trait Implementations§

§

impl<M = Rc<RefCell<Vec<u8>>>> !RefUnwindSafe for RetiredSource<M>

§

impl<M = Rc<RefCell<Vec<u8>>>> !Send for RetiredSource<M>

§

impl<M = Rc<RefCell<Vec<u8>>>> !Sync for RetiredSource<M>

§

impl<M = Rc<RefCell<Vec<u8>>>> !UnwindSafe for RetiredSource<M>

§

impl<M> Forget for RetiredSource<M>

§

impl<M> Freeze for RetiredSource<M>
where StableBTreeMap<StoreKey, Vec<u8>, M>: Freeze,

§

impl<M> Move for RetiredSource<M>

§

impl<M> Unpin for RetiredSource<M>
where StableBTreeMap<StoreKey, Vec<u8>, M>: Unpin,

§

impl<M> UnsafeUnpin for RetiredSource<M>
where StableBTreeMap<StoreKey, Vec<u8>, M>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.