W26CFMAQOXMUK4ZOJMAN4SMBXMWFQHO7HCTEVW73FQSRMJZFGJIQC
APPY2E7M5NHNC6MFYXSVEKJVAILK7YAZVTVE3W75EK2JNFVS3XBQC
AOX2XQISHGWNNAFBYRN44Q6AWG7H5DPBK5YMFHK42HQNZ2TMHEJQC
KMT3MF5NLEQIPZLHCRYDGQ5EA46HJCG3C2ANEPMZGKGHDK77ADPAC
OP6SVMOD2GTQ7VNJ4E5KYFG4MIYA7HBMXJTADALMZH4PY7OQRMZQC
ONES3V466GLO5CXKRF5ENK7VFOQPWM3YXLVRGWB56V5SH3W7XNBQC
6DMPXOAT5GQ3BQQOMUZN2GMBQPRA4IB7CCPHTQTIFGO3KWWAKF3QC
FMN7X4J24EYPOJNBUWM4NKGWSJTRV2DHCIBMPV2AXLZVVAMNOBKQC
6UVFCERMGSGNRWCVC3GWO5HWV6MSWE433DXBJVC7KRPP6LLJLCSQC
S4V4QZ5CF5LUDYWNR2UMWH6CHJDJ5FPGAZCQYM5GY7FJMJV4NN4QC
H3FVSQIQGFCFKCPXVOSFHP4OSUOBBURJESCZNGQTNDAAD3WQSBEQC
OTWDDJE7TTE73D6BGF4ZN6BH2NFUFLPME2VJ3CPALH463UGWLEIQC
WS4ZQM4RMIHZ6XZKSDQJGHN5SSSWFL4H236USOPUA33S6RC53RFAC
QEUTVAZ4F4EJXRDMWDMYXF6XEDMX7YPVG4IIXEKPIR3K54E5W5OAC
X3QVVQIS7B7L3XYZAWL3OOBUXOJ6RMOKQ45YMLLGAHYPEEKZ45ZAC
core::slice::from_raw_parts(
page.data.as_ptr().add(HDR) as *const L::Offset,
n0 as usize,
)
core::slice::from_raw_parts(page.data.as_ptr().add(HDR) as *const L::Offset, n0 as usize)
pub fn drop<T: AllocPage, K: Representable+?Sized, V: Representable+?Sized, P: BTreePage<K, V>>(txn: &mut T, db: Db_<K, V, P>) -> Result<(), T::Error> {
pub fn drop<
T: AllocPage,
K: Representable + ?Sized,
V: Representable + ?Sized,
P: BTreePage<K, V>,
>(
txn: &mut T,
db: Db_<K, V, P>,
) -> Result<(), T::Error> {
fn drop_<T: AllocPage, K: Representable+?Sized, V: Representable+?Sized, P: BTreePage<K, V>>(txn: &mut T, p: Page) -> Result<(), T::Error> {
fn drop_<T: AllocPage, K: Representable + ?Sized, V: Representable + ?Sized, P: BTreePage<K, V>>(
txn: &mut T,
p: Page,
) -> Result<(), T::Error> {
let (delk, delv, _) =
P::unchecked_current(txn, cur.page.as_page(), cur.cursor.as_ref().unwrap());
for o in delk.page_offsets().chain(delv.page_offsets()) {
txn.incr_rc(o)?;
}
P::unchecked_current(txn, cur.page.as_page(), cur.cursor.as_ref().unwrap())
};
for o in delk.page_offsets().chain(delv.page_offsets()) {
txn.incr_rc(o)?;
unsafe {
let (k, v, _) = P::unchecked_current(txn, curs0.page.as_page(), &c0);
if cursor.pointer >= cursor.first_rc_level {
for o in (&*k).page_offsets().chain((&*v).page_offsets()) {
txn.incr_rc(o)?;
}
let (k, v, _) = unsafe { P::unchecked_current(txn, curs0.page.as_page(), &c0) };
if is_rc {
for o in (&*k).page_offsets().chain((&*v).page_offsets()) {
txn.incr_rc(o)?;
pub stack: [core::mem::MaybeUninit<PageCursor<K, V, P>>; N_CURSORS],
// Invariant: all items up to (and including) stack[pointer],
// except possibly 0, are initialised.
stack: [core::mem::MaybeUninit<PageCursor<K, V, P>>; N_CURSORS],
pub pointer: usize,
pointer: usize,
}
impl<K: Representable + ?Sized, V: Representable + ?Sized, P: BTreePage<K, V>>
core::ops::Index<usize> for Cursor<K, V, P>
{
type Output = PageCursor<K, V, P>;
fn index(&self, i: usize) -> &PageCursor<K, V, P> {
assert!(i <= self.pointer);
unsafe { &*self.stack.index(i).as_ptr() }
}
}
impl<K: Representable + ?Sized, V: Representable + ?Sized, P: BTreePage<K, V>>
core::ops::IndexMut<usize> for Cursor<K, V, P>
{
fn index_mut(&mut self, i: usize) -> &mut PageCursor<K, V, P> {
assert!(i <= self.pointer);
unsafe { &mut *self.stack.index_mut(i).as_mut_ptr() }
}