Struct raftstore::store::region_snapshot::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,
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<S: Debug + Snapshot> Debug for RegionSnapshot<S>
[src]
impl<S> Peekable for RegionSnapshot<S> where
S: Snapshot,
[src]
S: Snapshot,
type DBVector = <S as Peekable>::DBVector
The byte-vector type through which the database returns read values.
fn get_value_opt(
&self,
opts: &ReadOptions,
key: &[u8]
) -> EngineResult<Option<Self::DBVector>>
[src]
&self,
opts: &ReadOptions,
key: &[u8]
) -> EngineResult<Option<Self::DBVector>>
fn get_value_cf_opt(
&self,
opts: &ReadOptions,
cf: &str,
key: &[u8]
) -> EngineResult<Option<Self::DBVector>>
[src]
&self,
opts: &ReadOptions,
cf: &str,
key: &[u8]
) -> EngineResult<Option<Self::DBVector>>
pub fn get_value(&self, key: &[u8]) -> Result<Option<Self::DBVector>, Error>
[src]
pub fn get_value_cf(
&self,
cf: &str,
key: &[u8]
) -> Result<Option<Self::DBVector>, Error>
[src]
&self,
cf: &str,
key: &[u8]
) -> Result<Option<Self::DBVector>, Error>
pub fn get_msg<M>(&self, key: &[u8]) -> Result<Option<M>, Error> where
M: Message + Default,
[src]
M: Message + Default,
pub fn get_msg_cf<M>(&self, cf: &str, key: &[u8]) -> Result<Option<M>, Error> where
M: Message + Default,
[src]
M: Message + Default,
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<V, W> ConvertFrom<W> for V where
W: ConvertTo<V>,
[src]
W: ConvertTo<V>,
pub fn convert_from(ctx: &mut EvalContext, from: W) -> Result<V, Error>
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[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,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,