Struct raftstore::store::RegionSnapshot [−][src]
Snapshot of a region.
Only data within a region can be accessed.
Fields
snap: Arc<S>
region: Arc<Region>
apply_index: Arc<AtomicU64>
max_ts_sync_status: Option<Arc<AtomicU64>>
Implementations
impl<S> RegionSnapshot<S> where
S: Snapshot,
[src][−]
S: Snapshot,
pub fn new<EK>(
ps: &PeerStorage<EK, impl RaftEngine>
) -> RegionSnapshot<EK::Snapshot> where
EK: KvEngine,
[src]
ps: &PeerStorage<EK, impl RaftEngine>
) -> RegionSnapshot<EK::Snapshot> where
EK: KvEngine,
pub fn from_raw<EK>(db: EK, region: Region) -> RegionSnapshot<EK::Snapshot> where
EK: KvEngine,
[src]
EK: KvEngine,
pub fn from_snapshot(snap: Arc<S>, region: Arc<Region>) -> RegionSnapshot<S>
[src]
pub fn get_region(&self) -> &Region
[src]
pub fn get_snapshot(&self) -> &S
[src]
pub fn get_apply_index(&self) -> Result<u64>
[src]
fn get_apply_index_from_storage(&self) -> Result<u64>
[src]
pub fn iter(&self, iter_opt: IterOptions) -> RegionIterator<S>
[src]
pub fn iter_cf(
&self,
cf: &str,
iter_opt: IterOptions
) -> Result<RegionIterator<S>>
[src]
&self,
cf: &str,
iter_opt: IterOptions
) -> Result<RegionIterator<S>>
pub fn scan<F>(
&self,
start_key: &[u8],
end_key: &[u8],
fill_cache: bool,
f: F
) -> Result<()> where
F: FnMut(&[u8], &[u8]) -> Result<bool>,
[src]
&self,
start_key: &[u8],
end_key: &[u8],
fill_cache: bool,
f: F
) -> Result<()> where
F: FnMut(&[u8], &[u8]) -> Result<bool>,
pub fn scan_cf<F>(
&self,
cf: &str,
start_key: &[u8],
end_key: &[u8],
fill_cache: bool,
f: F
) -> Result<()> where
F: FnMut(&[u8], &[u8]) -> Result<bool>,
[src]
&self,
cf: &str,
start_key: &[u8],
end_key: &[u8],
fill_cache: bool,
f: F
) -> Result<()> where
F: FnMut(&[u8], &[u8]) -> Result<bool>,
fn scan_impl<F>(
&self,
it: RegionIterator<S>,
start_key: &[u8],
f: F
) -> Result<()> where
F: FnMut(&[u8], &[u8]) -> Result<bool>,
[src]
&self,
it: RegionIterator<S>,
start_key: &[u8],
f: F
) -> Result<()> where
F: FnMut(&[u8], &[u8]) -> Result<bool>,
pub fn get_start_key(&self) -> &[u8]
[src]
pub fn get_end_key(&self) -> &[u8]
[src]
impl<S> RegionSnapshot<S> where
S: Snapshot,
[src][−]
S: Snapshot,
fn handle_get_value_error(
&self,
e: EngineError,
cf: &str,
key: &[u8]
) -> EngineError
[src]
&self,
e: EngineError,
cf: &str,
key: &[u8]
) -> EngineError
Trait Implementations
impl<S> Clone for RegionSnapshot<S> where
S: Snapshot,
[src][+]
S: Snapshot,
impl<S: Debug + Snapshot> Debug for RegionSnapshot<S>
[src][+]
impl<S> Peekable for RegionSnapshot<S> where
S: Snapshot,
[src][+]
S: Snapshot,
Auto Trait Implementations
impl<S> RefUnwindSafe for RegionSnapshot<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<S> Send for RegionSnapshot<S>
impl<S> Sync for RegionSnapshot<S>
impl<S> Unpin for RegionSnapshot<S>
impl<S> UnwindSafe for RegionSnapshot<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<V, W> ConvertFrom<W> for V where
W: ConvertTo<V>,
[src][+]
W: ConvertTo<V>,
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][+]
U: From<T>,
impl<T> Pointable for T
[src][+]
impl<T> Pointable for T
[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]
T: ?Sized,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src][+]
V: MultiLane<T>,