pub struct FetchOptions {
pub include_prereleases: bool,
pub include_drafts: bool,
pub max_versions: Option<usize>,
pub github_token: Option<String>,
pub timeout: Duration,
}Expand description
Options for filtering releases
Fields§
§include_prereleases: boolInclude pre-releases
include_drafts: boolInclude drafts (requires authentication)
max_versions: Option<usize>Maximum number of versions to return
github_token: Option<String>GitHub personal access token for higher rate limits
timeout: DurationRequest timeout
Implementations§
Source§impl FetchOptions
impl FetchOptions
Sourcepub fn with_prereleases(self, include: bool) -> Self
pub fn with_prereleases(self, include: bool) -> Self
Include pre-releases in results
Sourcepub fn with_drafts(self, include: bool) -> Self
pub fn with_drafts(self, include: bool) -> Self
Include drafts in results
Sourcepub fn with_max_versions(self, max: usize) -> Self
pub fn with_max_versions(self, max: usize) -> Self
Set maximum number of versions to return
Sourcepub fn with_github_token<S: Into<String>>(self, token: S) -> Self
pub fn with_github_token<S: Into<String>>(self, token: S) -> Self
Set GitHub token for authentication
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set request timeout
Trait Implementations§
Source§impl Clone for FetchOptions
impl Clone for FetchOptions
Source§fn clone(&self) -> FetchOptions
fn clone(&self) -> FetchOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FetchOptions
impl Debug for FetchOptions
Auto Trait Implementations§
impl Freeze for FetchOptions
impl RefUnwindSafe for FetchOptions
impl Send for FetchOptions
impl Sync for FetchOptions
impl Unpin for FetchOptions
impl UnsafeUnpin for FetchOptions
impl UnwindSafe for FetchOptions
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