pub struct AuditCursor {
pub at: i64,
pub id: String,
}Expand description
Keyset position in the audit result order.
The order is (at DESC, id DESC) — at alone is kamaji’s clock and is
not unique, so the row id breaks ties and makes the order total. That
totality is what lets this be a keyset cursor rather than an offset:
rows appended while a client pages never shift the rows behind it, so no
row is skipped or repeated.
Opaque on the wire — see to_wire /
from_wire. Clients must treat the string as a token
to echo back, never as a parseable position.
Fields§
§at: i64§id: StringImplementations§
Source§impl AuditCursor
impl AuditCursor
pub fn new(at: i64, id: impl Into<String>) -> Self
Sourcepub fn to_wire(&self) -> String
pub fn to_wire(&self) -> String
Encode for the wire — base64url-no-pad over "<at>:<id>". The
encoding is deliberately opaque, not signed: the cursor names a
public position in a result set the caller is already authorized to
read, so forging one grants nothing the caller couldn’t ask for
directly with since=. Authorization is re-checked per request and
never carried in the cursor.
Trait Implementations§
Source§impl Clone for AuditCursor
impl Clone for AuditCursor
Source§fn clone(&self) -> AuditCursor
fn clone(&self) -> AuditCursor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more