#[non_exhaustive]pub enum AppcastVersion {
ShortVersionString,
BundleVersion,
}Expand description
Which appcast field holds the version that is compared and reported.
Sparkle itself orders updates by sparkle:version (the bundle’s
CFBundleVersion, often a build number) and shows
sparkle:shortVersionString (CFBundleShortVersionString) to users. This
crate orders by semver, so it reads the field that holds one.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ShortVersionString
Use sparkle:shortVersionString, falling back to sparkle:version
when an item has no short version (Sparkle’s own display rule).
BundleVersion
Use sparkle:version only. Pick this when your CFBundleVersion is
itself a semantic version.
Implementations§
Source§impl AppcastVersion
impl AppcastVersion
Sourcepub fn resolve(
self,
short_version: Option<&str>,
bundle_version: Option<&str>,
) -> Result<Version, Error>
pub fn resolve( self, short_version: Option<&str>, bundle_version: Option<&str>, ) -> Result<Version, Error>
Resolve an item’s version from its short and bundle version strings.
Both values are parsed with parse_version_lenient, so 1.4 reads
as 1.4.0. A present but unparsable value is an error; it does not fall
back to the other field.
§Errors
Returns Error::Parse when the selected field is missing or is not a
version this crate can order.
Trait Implementations§
Source§impl Clone for AppcastVersion
impl Clone for AppcastVersion
Source§fn clone(&self) -> AppcastVersion
fn clone(&self) -> AppcastVersion
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for AppcastVersion
Source§impl Debug for AppcastVersion
impl Debug for AppcastVersion
Source§impl Default for AppcastVersion
impl Default for AppcastVersion
Source§fn default() -> AppcastVersion
fn default() -> AppcastVersion
impl Eq for AppcastVersion
Source§impl PartialEq for AppcastVersion
impl PartialEq for AppcastVersion
impl StructuralPartialEq for AppcastVersion
Auto Trait Implementations§
impl Freeze for AppcastVersion
impl RefUnwindSafe for AppcastVersion
impl Send for AppcastVersion
impl Sync for AppcastVersion
impl Unpin for AppcastVersion
impl UnsafeUnpin for AppcastVersion
impl UnwindSafe for AppcastVersion
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
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> ⓘ
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> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().