pub trait IntoCursor {
// Required method
fn into_cursor(self) -> Option<Cursor>;
}Expand description
Trait for types that can be converted into a cursor.
This provides flexible DX for cursor pagination methods:
Cursor- zero-cost move when you own the cursor&str- automatically decodes, returns None if invalidOption<&str>- perfect forreq.query("after")results
§Example
ⓘ
// All of these work:
.after_cursor(cursor) // Cursor (zero-cost move)
.after_cursor(cursor.clone()) // explicit clone if you need to keep it
.after_cursor("eyJpZCI6MTAwfQ") // &str (base64 encoded)
.after_cursor(req.query("after")) // Option<&str>Required Methods§
Sourcefn into_cursor(self) -> Option<Cursor>
fn into_cursor(self) -> Option<Cursor>
Convert into an optional cursor. Returns None if the input is invalid or missing.