Skip to main content

PaginationCursor

Struct PaginationCursor 

Source
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>

Source

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.

Source

pub fn with_cursor<R>(&self, inspect: impl FnOnce(&[u8]) -> R) -> R

Runs a closure with the exact opaque cursor bytes.

Trait Implementations§

Source§

impl Debug for PaginationCursor<'_>

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.