pub enum SourceSpec {
GitHubReleases {
api_base: String,
repo: String,
token: Option<String>,
},
NuGet {
feed: String,
},
Manifest {
url: String,
},
None,
}Expand description
Which source answers the check.
Variants§
GitHubReleases
The GitHub (or GitHub Enterprise Server) releases API.
Fields
NuGet
A NuGet v3 service index (.../index.json) or a v2 root.
Manifest
A static latest.json.
None
Never asks anyone (a managed deployment).
Implementations§
Source§impl SourceSpec
impl SourceSpec
Sourcepub fn notices_url(
&self,
repo: &str,
download_base: Option<&str>,
) -> Option<String>
pub fn notices_url( &self, repo: &str, download_base: Option<&str>, ) -> Option<String>
Where the signed security notices are for this source, or None when
nothing may be asked (the None source; a NuGet feed of the
organization’s own, which is not a reason to contact GitHub; a GitHub
Enterprise Server, whose host is not a release host).
- GitHub:
<web>/<repo>/releases/latest/download/security.json. - A manifest mirror:
security.jsonnext to the manifest. - NuGet: from GitHub when the feed is the public one; otherwise from
the policy’s
download_basemirror when there is one.
Source§impl SourceSpec
impl SourceSpec
Sourcepub async fn check(
&self,
transport: &dyn HttpTransport,
params: &CheckParams,
) -> Result<Option<Release>>
pub async fn check( &self, transport: &dyn HttpTransport, params: &CheckParams, ) -> Result<Option<Release>>
Asks the source for the newest release newer than params.running.
Trait Implementations§
Source§impl CheckSource for SourceSpec
impl CheckSource for SourceSpec
fn latest<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
transport: &'life1 dyn HttpTransport,
params: &'life2 CheckParams,
) -> Pin<Box<dyn Future<Output = Result<Option<Release>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§impl Clone for SourceSpec
impl Clone for SourceSpec
Source§impl Debug for SourceSpec
impl Debug for SourceSpec
impl Eq for SourceSpec
Source§impl PartialEq for SourceSpec
impl PartialEq for SourceSpec
impl StructuralPartialEq for SourceSpec
Auto Trait Implementations§
impl Forget for SourceSpec
impl Freeze for SourceSpec
impl Move for SourceSpec
impl RefUnwindSafe for SourceSpec
impl Send for SourceSpec
impl Sync for SourceSpec
impl Unpin for SourceSpec
impl UnsafeUnpin for SourceSpec
impl UnwindSafe for SourceSpec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§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.