pub trait NamespaceCursor: PageCursor {
// Required methods
fn namespace_id(&self) -> &NamespaceId;
fn last_key(&self) -> Option<&str>;
fn key_prefix(&self) -> String;
}Expand description
A cursor that resumes an enumeration of one namespace’s own keyspace.
Maintenance passes walk keys rather than rows, and their cursors are enumeration shortcuts and nothing else: a pass re-reads whatever authorizes the work it does, whatever position it resumed from, so a cursor that is lost or refused costs a repeated walk and never a wrong decision. What the binding buys is that a token minted for another namespace, another job, or another key family is refused instead of quietly skipping the keys between here and wherever it points.
Required Methods§
Sourcefn namespace_id(&self) -> &NamespaceId
fn namespace_id(&self) -> &NamespaceId
Namespace whose keyspace this cursor walks.
Sourcefn key_prefix(&self) -> String
fn key_prefix(&self) -> String
Prefix every key this cursor may name lies under.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".