pub struct GitLabPagedOp<E> { /* private fields */ }Expand description
A paginated GitLab endpoint wrapped as an Ironflow Operation.
Created via GitLab::paged_op. Unlike GitLabOp,
which issues a single request, this drives pagination itself and concatenates every page
requested by pagination into a single JSON array.
§Examples
use ironflow_ops_gitlab::GitLab;
use gitlab::api::projects::merge_requests::MergeRequests;
use gitlab::api::Pagination;
let gitlab = GitLab::new("glpat-xxxx", "gitlab.com").await?;
let endpoint = MergeRequests::builder().project(42).build().unwrap();
let op = gitlab.paged_op(endpoint, Pagination::All);§Errors
Operation::execute returns OperationError::Http if any page request fails.
Trait Implementations§
Source§impl<E> Operation for GitLabPagedOp<E>
impl<E> Operation for GitLabPagedOp<E>
Source§fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 OperationContext,
) -> Pin<Box<dyn Future<Output = Result<Value, OperationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 OperationContext,
) -> Pin<Box<dyn Future<Output = Result<Value, OperationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute the operation and return the result as JSON. Read more
Auto Trait Implementations§
impl<E> !RefUnwindSafe for GitLabPagedOp<E>
impl<E> !UnwindSafe for GitLabPagedOp<E>
impl<E> Freeze for GitLabPagedOp<E>
impl<E> Send for GitLabPagedOp<E>
impl<E> Sync for GitLabPagedOp<E>
impl<E> Unpin for GitLabPagedOp<E>
impl<E> UnsafeUnpin for GitLabPagedOp<E>where
Paged<E>: UnsafeUnpin,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more