Struct ajour_core::addon::Addon[][src]

pub struct Addon {
    pub primary_folder_id: String,
    pub folders: Vec<AddonFolder>,
    pub state: AddonState,
    pub release_channel: ReleaseChannel,
    // some fields omitted
}

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: AddonStaterelease_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]

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]

Returns the changelog url of the addon.

pub async fn changelog(
    &self,
    default_release_channel: GlobalReleaseChannel
) -> Result<Changelog, RepositoryError>
[src]

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]

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]

impl PartialEq<Addon> for Addon[src]

impl PartialOrd<Addon> for Addon[src]

impl TryFrom<&'_ Addon> for AddonCacheEntry[src]

type Error = CacheError

The type returned in the event of a conversion error.

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]