pub struct ReadTxn<'a> { /* private fields */ }Expand description
Concurrent read view pinned at a revision ceiling.
Implementations§
Source§impl<'a> ReadTxn<'a>
impl<'a> ReadTxn<'a>
Sourcepub fn new(db: &'a InfiniteDb) -> Self
pub fn new(db: &'a InfiniteDb) -> Self
Pin reads at the current database revision on main.
Sourcepub fn on_branch(self, branch: BranchId) -> Self
pub fn on_branch(self, branch: BranchId) -> Self
Read through a branch overlay instead of main.
Sourcepub fn as_of(self, rev: RevisionId) -> Self
pub fn as_of(self, rev: RevisionId) -> Self
Override the revision ceiling for this read view.
Sourcepub fn query(&self, space: SpaceId) -> Result<Vec<Record>>
pub fn query(&self, space: SpaceId) -> Result<Vec<Record>>
Query all live records in space within this read view.
Sourcepub fn query_bbox(
&self,
space: SpaceId,
min: DimensionVector,
max: DimensionVector,
) -> Result<Vec<Record>>
pub fn query_bbox( &self, space: SpaceId, min: DimensionVector, max: DimensionVector, ) -> Result<Vec<Record>>
Bounding-box query within this read view.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ReadTxn<'a>
impl<'a> !UnwindSafe for ReadTxn<'a>
impl<'a> Freeze for ReadTxn<'a>
impl<'a> Send for ReadTxn<'a>
impl<'a> Sync for ReadTxn<'a>
impl<'a> Unpin for ReadTxn<'a>
impl<'a> UnsafeUnpin for ReadTxn<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more