turso_core 0.1.3

The Turso database library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::types::ImmutableRecord;

#[derive(Default)]
pub struct PseudoCursor {
    current: Option<ImmutableRecord>,
}

impl PseudoCursor {
    pub fn record(&self) -> Option<&ImmutableRecord> {
        self.current.as_ref()
    }

    pub fn insert(&mut self, record: ImmutableRecord) {
        self.current = Some(record);
    }
}