pub struct PagerDriver<S> { /* private fields */ }Expand description
Single-owner request/response sequencer for one pagination strategy.
ⓘ
use cloud_sdk::pagination::{NumberedPagination, PagerDriver};
fn duplicate(driver: PagerDriver<NumberedPagination>) {
let _copy = driver.clone();
}Implementations§
Source§impl<S> PagerDriver<S>where
S: PageStrategy,
impl<S> PagerDriver<S>where
S: PageStrategy,
Sourcepub const fn is_terminal(&self) -> bool
pub const fn is_terminal(&self) -> bool
Reports whether no response can be accepted.
Sourcepub fn next_request(
&mut self,
control: PagerControl,
) -> Result<PagerStep<S::Request>, PagerDriverError>
pub fn next_request( &mut self, control: PagerControl, ) -> Result<PagerStep<S::Request>, PagerDriverError>
Admits one next request, completes, or cancels.
Sourcepub fn observe<'observation>(
&mut self,
observation: S::Observation<'observation>,
) -> Result<S::Boundary, PagerDriverError>
pub fn observe<'observation>( &mut self, observation: S::Observation<'observation>, ) -> Result<S::Boundary, PagerDriverError>
Accepts exactly one decoded response for the admitted request.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for PagerDriver<S>where
S: Freeze,
impl<S> RefUnwindSafe for PagerDriver<S>where
S: RefUnwindSafe,
impl<S> Send for PagerDriver<S>where
S: Send,
impl<S> Sync for PagerDriver<S>where
S: Sync,
impl<S> Unpin for PagerDriver<S>where
S: Unpin,
impl<S> UnsafeUnpin for PagerDriver<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for PagerDriver<S>where
S: UnwindSafe,
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