pub struct Cursor(/* private fields */);Expand description
An opaque keyset continuation token.
The encoding is not a documented format and confers no authority. A token presented to a different query, different filters, or a different page size is rejected rather than reinterpreted.
Implementations§
Source§impl Cursor
impl Cursor
Sourcepub fn from_bytes(value: impl Into<Vec<u8>>) -> Result<Self, CursorError>
pub fn from_bytes(value: impl Into<Vec<u8>>) -> Result<Self, CursorError>
Reconstructs a cursor from its opaque bytes.
§Errors
Returns CursorError::CursorInvalid when the token is empty or
exceeds MAX_CURSOR_BYTES.
Sourcepub fn from_hex(value: &str) -> Result<Self, CursorError>
pub fn from_hex(value: &str) -> Result<Self, CursorError>
Reconstructs a cursor from its lowercase hexadecimal text form.
§Errors
Returns CursorError::CursorInvalid when the text is not an even
number of hexadecimal digits within the token bound.
Trait Implementations§
impl Eq for Cursor
Source§impl Ord for Cursor
impl Ord for Cursor
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Cursor
impl PartialOrd for Cursor
impl StructuralPartialEq for Cursor
Auto Trait Implementations§
impl Freeze for Cursor
impl RefUnwindSafe for Cursor
impl Send for Cursor
impl Sync for Cursor
impl Unpin for Cursor
impl UnsafeUnpin for Cursor
impl UnwindSafe for Cursor
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