#[non_exhaustive]pub struct Cursor {
pub value: String,
pub expiration: Option<DropboxTimestamp>,
}
async_routes
and dbx_paper
only.Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.value: String
The actual cursor value.
expiration: Option<DropboxTimestamp>
Expiration time of value
. Some cursors might have expiration time assigned. This is a UTC
value after which the cursor is no longer valid and the API starts returning an error. If
cursor expires a new one needs to be obtained and pagination needs to be restarted. Some
cursors might be short-lived some cursors might be long-lived. This really depends on the
sorting type and order, e.g.: 1. on one hand, listing docs created by the user, sorted by
the created time ascending will have undefinite expiration because the results cannot change
while the iteration is happening. This cursor would be suitable for long term polling. 2. on
the other hand, listing docs sorted by the last modified time will have a very short
expiration as docs do get modified very often and the modified time can be changed while the
iteration is happening thus altering the results.
Implementations§
Source§impl Cursor
impl Cursor
pub fn new(value: String) -> Self
pub fn with_expiration(self, value: DropboxTimestamp) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Cursor
impl<'de> Deserialize<'de> for Cursor
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
impl Eq 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.