[−][src]Struct octocrab::Page
A Page of GitHub results, with links to the next and previous page.
let octocrab = octocrab::instance(); // Print the titles of the first page of issues. for issue in octocrab.issues("rust-lang", "rust").list().send().await? { println!("{}", issue.title); }
Fields (Non-exhaustive)
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.items: Vec<T>
incomplete_results: Option<bool>
total_count: Option<u64>
next: Option<Url>
prev: Option<Url>
first: Option<Url>
last: Option<Url>
Implementations
impl<T> Page<T>
[src]
pub fn take_items(&mut self) -> Vec<T>
[src]
Returns the current set of items, replacing it with an empty Vec.
pub fn number_of_pages(&self) -> Option<u32>
[src]
If last
is present, return the number of pages for this navigation.
Trait Implementations
impl<T: Clone> Clone for Page<T>
[src]
impl<T: Debug> Debug for Page<T>
[src]
impl<T> Default for Page<T>
[src]
impl<T: DeserializeOwned> FromResponse for Page<T>
[src]
fn from_response<'async_trait>(
response: Response
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>> where
Self: 'async_trait,
[src]
response: Response
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>> where
Self: 'async_trait,
impl<T> IntoIterator for Page<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Page<T> where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
impl<T> Send for Page<T> where
T: Send,
[src]
T: Send,
impl<T> Sync for Page<T> where
T: Sync,
[src]
T: Sync,
impl<T> Unpin for Page<T> where
T: Unpin,
[src]
T: Unpin,
impl<T> UnwindSafe for Page<T> where
T: UnwindSafe,
[src]
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,