pub trait PageStrategy {
type Request: Copy;
type Observation<'observation>;
type Boundary;
// Required methods
fn next_request(&self) -> Result<Self::Request, PaginationError>;
fn observe<'observation>(
&mut self,
observation: Self::Observation<'observation>,
) -> Result<Self::Boundary, PaginationError>;
}Expand description
Provider-neutral page strategy driven without transport or allocation.
Required Associated Types§
Sourcetype Observation<'observation>
type Observation<'observation>
Decoded response observation, optionally borrowing provider state.
Required Methods§
Sourcefn next_request(&self) -> Result<Self::Request, PaginationError>
fn next_request(&self) -> Result<Self::Request, PaginationError>
Returns the next request token or PaginationError::Complete.
Sourcefn observe<'observation>(
&mut self,
observation: Self::Observation<'observation>,
) -> Result<Self::Boundary, PaginationError>
fn observe<'observation>( &mut self, observation: Self::Observation<'observation>, ) -> Result<Self::Boundary, PaginationError>
Transactionally validates and accepts one response.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".