Struct raftstore::store::snap::Snap[][src]

pub struct Snap {
    key: SnapKey,
    display_path: String,
    dir_path: PathBuf,
    cf_files: Vec<CfFile>,
    cf_index: usize,
    meta_file: MetaFile,
    hold_tmp_files: bool,
    mgr: SnapManagerCore,
}

Fields

key: SnapKeydisplay_path: Stringdir_path: PathBufcf_files: Vec<CfFile>cf_index: usizemeta_file: MetaFilehold_tmp_files: boolmgr: SnapManagerCore

Implementations

impl Snap[src]

fn new<T: Into<PathBuf>>(
    dir: T,
    key: &SnapKey,
    is_sending: bool,
    check_policy: CheckPolicy,
    mgr: &SnapManagerCore
) -> RaftStoreResult<Self>
[src]

fn new_for_building<T: Into<PathBuf>>(
    dir: T,
    key: &SnapKey,
    mgr: &SnapManagerCore
) -> RaftStoreResult<Self>
[src]

fn new_for_sending<T: Into<PathBuf>>(
    dir: T,
    key: &SnapKey,
    mgr: &SnapManagerCore
) -> RaftStoreResult<Self>
[src]

fn new_for_receiving<T: Into<PathBuf>>(
    dir: T,
    key: &SnapKey,
    mgr: &SnapManagerCore,
    snapshot_meta: SnapshotMeta
) -> RaftStoreResult<Self>
[src]

fn new_for_applying<T: Into<PathBuf>>(
    dir: T,
    key: &SnapKey,
    mgr: &SnapManagerCore
) -> RaftStoreResult<Self>
[src]

fn init_for_building(&mut self) -> RaftStoreResult<()>[src]

fn read_snapshot_meta(&mut self) -> RaftStoreResult<SnapshotMeta>[src]

fn set_snapshot_meta(
    &mut self,
    snapshot_meta: SnapshotMeta
) -> RaftStoreResult<()>
[src]

fn load_snapshot_meta(&mut self) -> RaftStoreResult<()>[src]

fn get_display_path(dir_path: impl AsRef<Path>, prefix: &str) -> String[src]

fn validate(
    &self,
    engine: &impl KvEngine,
    for_send: bool
) -> RaftStoreResult<()>
[src]

fn switch_to_cf_file(&mut self, cf: &str) -> Result<()>[src]

fn save_meta_file(&mut self) -> RaftStoreResult<()>[src]

fn do_build<EK: KvEngine>(
    &mut self,
    engine: &EK,
    kv_snap: &EK::Snapshot,
    region: &Region,
    stat: &mut SnapshotStatistics
) -> RaftStoreResult<()> where
    EK: KvEngine
[src]

Trait Implementations

impl Debug for Snap[src]

impl Drop for Snap[src]

impl GenericSnapshot for Snap[src]

impl Read for Snap[src]

impl<EK> Snapshot<EK> for Snap where
    EK: KvEngine
[src]

impl Write for Snap[src]

Auto Trait Implementations

impl !RefUnwindSafe for Snap

impl Send for Snap

impl !Sync for Snap

impl Unpin for Snap

impl !UnwindSafe for Snap

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> BytesEncoder for T where
    T: Write
[src]

impl<V, W> ConvertFrom<W> for V where
    W: ConvertTo<V>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> NumberEncoder for T where
    T: Write
[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<R> ReadBytesExt for R where
    R: Read + ?Sized
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> Sealed<T> for T where
    T: ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<W> WriteBytesExt for W where
    W: Write + ?Sized
[src]