Skip to main content

CopyOptions

Struct CopyOptions 

Source
pub struct CopyOptions {
    pub store: StoreOptions,
    pub accept_stale_pages: bool,
}
Expand description

How copy_store builds its target.

Fields§

§store: StoreOptions

The target store’s options (trust, buffers, queues…). Its block size is the source’s whatever this says, and its table holds at least the source’s regions; the container format is 2.

§accept_stale_pages: bool

Copy a source the open left frozen (a stale or lost table page) or with unavailable regions or entries this version cannot read, instead of refusing it (spec §12, “What copy_store copies”; the way out of a store no repair can mend in place):

  • every usable region, by its recorded data size;
  • a usable region of a stale page in full: its whole capacity, plus the extra extent its header lists when that overlaps no other region’s footprint and no reserved span (a growth whose commit may be the page’s lost one); the target’s data size covers all of it, and its recorded data size is reported (CopyReport::verified_up_to): the bytes past it may never have been written, may be the newest, or (where no check can tell: a growth another damaged header never listed, an uncommitted one of a confirmed page’s region) may never have been this region’s;
  • every stale page reported (CopyReport::stale_pages): its newest commit is given up, so a region it created is missing and one it released is back;
  • unavailable regions and unreadable entries left out, reported (CopyReport::omitted); a lost page’s regions are unknown, reported by page (CopyReport::lost_pages);
  • a possibly superseded region copied and reported (CopyReport::superseded): it may read another region’s bytes.

Default false: such a source is refused.

Trait Implementations§

Source§

impl Clone for CopyOptions

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CopyOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CopyOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.