pub struct GitHubSource { /* private fields */ }Expand description
Release source backed by the latest GitHub Release of a repository.
Assets are matched by target marker in the filename, and each installer
asset must have a sibling .sig or .minisig asset with the same base
name.
Implementations§
Source§impl GitHubSource
impl GitHubSource
Sourcepub fn new(owner: impl Into<String>, repo: impl Into<String>) -> Self
pub fn new(owner: impl Into<String>, repo: impl Into<String>) -> Self
Creates a GitHub-backed release source for production use.
Anonymous requests are subject to GitHub API rate limits and only work for public repositories.
Sourcepub fn with_auth_token(
owner: impl Into<String>,
repo: impl Into<String>,
token: impl AsRef<str>,
) -> Result<Self>
pub fn with_auth_token( owner: impl Into<String>, repo: impl Into<String>, token: impl AsRef<str>, ) -> Result<Self>
Creates a GitHub-backed source that authenticates requests with a personal access token.
This enables private-repository releases and higher GitHub API rate limits. The same token is propagated to release-asset and signature downloads handled by the updater.
Trait Implementations§
Source§impl Clone for GitHubSource
impl Clone for GitHubSource
Source§fn clone(&self) -> GitHubSource
fn clone(&self) -> GitHubSource
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 GitHubSource
impl Debug for GitHubSource
Source§impl ReleaseSource for GitHubSource
impl ReleaseSource for GitHubSource
Source§fn fetch<'a>(&'a self, request: &'a SourceRequest) -> SourceFuture<'a>
fn fetch<'a>(&'a self, request: &'a SourceRequest) -> SourceFuture<'a>
Fetches release metadata for the requested target.
Auto Trait Implementations§
impl !Freeze for GitHubSource
impl !RefUnwindSafe for GitHubSource
impl Send for GitHubSource
impl Sync for GitHubSource
impl Unpin for GitHubSource
impl UnsafeUnpin for GitHubSource
impl !UnwindSafe for GitHubSource
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<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