pub struct PaginationCursor<'storage> { /* private fields */ }Expand description
Cleanup-owning opaque cursor populated by atomic source transfer.
This type is intentionally neither Copy nor Clone.
ⓘ
use cloud_sdk::pagination::PaginationCursor;
fn require_copy<T: Copy>() {}
require_copy::<PaginationCursor<'static>>();Implementations§
Source§impl<'storage> PaginationCursor<'storage>
impl<'storage> PaginationCursor<'storage>
Sourcepub fn transfer_from(
source: &mut [u8],
destination: &'storage mut [u8],
limits: PaginationLimits,
) -> Result<Self, PaginationError>
pub fn transfer_from( source: &mut [u8], destination: &'storage mut [u8], limits: PaginationLimits, ) -> Result<Self, PaginationError>
Moves source bytes into cleanup-owning caller storage.
Source and complete destination storage are cleared on every failure. Source is also cleared after a successful transfer.
Sourcepub fn with_cursor<R>(&self, inspect: impl FnOnce(&[u8]) -> R) -> R
pub fn with_cursor<R>(&self, inspect: impl FnOnce(&[u8]) -> R) -> R
Runs a closure with the exact opaque cursor bytes.
Trait Implementations§
Auto Trait Implementations§
impl<'storage> !UnwindSafe for PaginationCursor<'storage>
impl<'storage> Freeze for PaginationCursor<'storage>
impl<'storage> RefUnwindSafe for PaginationCursor<'storage>
impl<'storage> Send for PaginationCursor<'storage>
impl<'storage> Sync for PaginationCursor<'storage>
impl<'storage> Unpin for PaginationCursor<'storage>
impl<'storage> UnsafeUnpin for PaginationCursor<'storage>
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