Struct ajour_core::addon::Addon [−][src]
Struct which stores information about a single Addon. This struct is enriched
with metadata from the active repository for the addon. If there is no match
to any repository, metadata will be used from the primary AddonFolder
for this
Addon
.
Fields
primary_folder_id: String
Id of the AddonFolder
that will serve as a fallback for metadata if no
match to any Repository or if those fields don’t populate from the active repository
API. Also serves as the unique identifier for this Addon
.
When we match against Curse which has modules
for bundling multiple folders
into a single Addon, we use the first folder name alphabetically.
When matching against Tukui, we use the folder which has the Tukui project id
folders: Vec<AddonFolder>
All AddonFolder
’s provided by this Addon
state: AddonState
release_channel: ReleaseChannel
Implementations
impl Addon
[src]
pub fn empty(primary_folder_id: &str) -> Self
[src]
pub fn set_repository(&mut self, repo_package: RepositoryPackage)
[src]
pub fn set_remote_package_from_repo_package(
&mut self,
repo_package: &RepositoryPackage
)
[src]
&mut self,
repo_package: &RepositoryPackage
)
pub fn update_addon_folders(&mut self, folders: Vec<AddonFolder>)
[src]
pub fn repository(&self) -> Option<&RepositoryPackage>
[src]
pub fn repository_kind(&self) -> Option<RepositoryKind>
[src]
Returns the repository kind linked to this addon
pub fn version(&self) -> Option<&str>
[src]
Returns the version of the addon
pub fn set_version(&mut self, version: String)
[src]
Sets the version of the addon
pub fn set_file_id(&mut self, file_id: i64)
[src]
Sets the file id of the addon
pub fn title(&self) -> &str
[src]
Returns the title of the addon.
pub fn author(&self) -> Option<&str>
[src]
Returns the author of the addon.
pub fn game_version(&self) -> Option<&str>
[src]
Returns the game version of the addon.
pub fn notes(&self) -> Option<&str>
[src]
Returns the notes of the addon.
pub fn website_url(&self) -> Option<&str>
[src]
Returns the website url of the addon.
pub fn changelog_url(
&self,
default_release_channel: GlobalReleaseChannel
) -> Option<String>
[src]
&self,
default_release_channel: GlobalReleaseChannel
) -> Option<String>
Returns the changelog url of the addon.
pub async fn changelog(
&self,
default_release_channel: GlobalReleaseChannel
) -> Result<Changelog, RepositoryError>
[src]
&self,
default_release_channel: GlobalReleaseChannel
) -> Result<Changelog, RepositoryError>
pub fn curse_id(&self) -> Option<i32>
[src]
Returns the curse id of the addon, if applicable.
pub fn tukui_id(&self) -> Option<&str>
[src]
Returns the tukui id of the addon, if applicable.
pub fn wowi_id(&self) -> Option<&str>
[src]
Returns the wowi id of the addon, if applicable.
pub fn hub_id(&self) -> Option<i32>
[src]
Returns the hub id of the addon, if applicable.
pub fn remote_packages(&self) -> HashMap<ReleaseChannel, RemotePackage>
[src]
pub fn file_id(&self) -> Option<i64>
[src]
pub fn repository_id(&self) -> Option<&str>
[src]
Returns the repository id for the active repository
pub fn is_ignored(&self, ignored: Option<&Vec<String>>) -> bool
[src]
Function returns a bool
indicating if the user has manually ignored the addon.
pub fn is_updatable(&self, remote_package: &RemotePackage) -> bool
[src]
Function returns a bool
indicating if the remote_package
is a update.
pub fn relevant_release_package(
&self,
default_release_channel: GlobalReleaseChannel
) -> Option<RemotePackage>
[src]
&self,
default_release_channel: GlobalReleaseChannel
) -> Option<RemotePackage>
Returns the relevant release_package for the addon. Logic is that if a release channel above the selected is newer, we return that instead.
Trait Implementations
impl Clone for Addon
[src]
impl Debug for Addon
[src]
impl Eq for Addon
[src]
impl Ord for Addon
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Addon> for Addon
[src]
impl PartialOrd<Addon> for Addon
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl TryFrom<&'_ Addon> for AddonCacheEntry
[src]
type Error = CacheError
The type returned in the event of a conversion error.
fn try_from(addon: &Addon) -> Result<Self, CacheError>
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Addon
impl Send for Addon
impl Sync for Addon
impl Unpin for Addon
impl !UnwindSafe for Addon
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> DynClone for T where
T: Clone,
[src]
T: Clone,
pub fn __clone_box(&self, Private) -> *mut ()
[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> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,