pub enum FetchStrategy {
SingleShot,
Paged {
per_page: u32,
},
}Expand description
平台的分页能力。
用枚举显式表达,而非靠算术巧合让循环在单次取满的平台上恰好只跑一轮。
Variants§
SingleShot
底层 CLI 自行翻页,一次调用即可取至多 N 条。
gh(--limit)与 gitcode(--limit)适用。
Paged
必须由调用方逐页请求,每页至多 per_page 条。
glab 适用:其 --per-page 受 GitLab API 限制,上限 100。
Trait Implementations§
Source§impl Clone for FetchStrategy
impl Clone for FetchStrategy
impl Copy for FetchStrategy
Source§impl Debug for FetchStrategy
impl Debug for FetchStrategy
impl Eq for FetchStrategy
Source§impl PartialEq for FetchStrategy
impl PartialEq for FetchStrategy
impl StructuralPartialEq for FetchStrategy
Auto Trait Implementations§
impl Freeze for FetchStrategy
impl RefUnwindSafe for FetchStrategy
impl Send for FetchStrategy
impl Sync for FetchStrategy
impl Unpin for FetchStrategy
impl UnsafeUnpin for FetchStrategy
impl UnwindSafe for FetchStrategy
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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