mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-18 17:14:20 +01:00
20 lines
365 B
Rust
20 lines
365 B
Rust
use crate::types::OwnedRecord;
|
|
|
|
pub struct PseudoCursor {
|
|
current: Option<OwnedRecord>,
|
|
}
|
|
|
|
impl PseudoCursor {
|
|
pub fn new() -> Self {
|
|
Self { current: None }
|
|
}
|
|
|
|
pub fn record(&self) -> Option<&OwnedRecord> {
|
|
self.current.as_ref()
|
|
}
|
|
|
|
pub fn insert(&mut self, record: OwnedRecord) {
|
|
self.current = Some(record);
|
|
}
|
|
}
|