InstrKind

Enum InstrKind 

Source
pub enum InstrKind {
Show 46 variants If { condition: Condition, if_block: BlockId, else_blocks: Vec<ElseBlock>, }, Name(Later<String>), Description(Later<String>), LongDescription(Later<String>), Authors(Vec<String>), PackageMaintainers(Vec<String>), Website(Later<String>), SupportLink(Later<String>), Documentation(Later<String>), Source(Later<String>), Issues(Later<String>), Community(Later<String>), Icon(Later<String>), Banner(Later<String>), Gallery(Vec<String>), License(Later<String>), Keywords(Vec<String>), Categories(Vec<String>), Features(Vec<String>), DefaultFeatures(Vec<String>), ContentVersions(Vec<String>), ModrinthID(Later<String>), CurseForgeID(Later<String>), SmithedID(Later<String>), SupportedVersions(Vec<VersionPattern>), SupportedModloaders(Vec<ModloaderMatch>), SupportedPluginLoaders(Vec<PluginLoaderMatch>), SupportedSides(Vec<Side>), SupportedOperatingSystems(Vec<OSCondition>), SupportedArchitectures(Vec<ArchCondition>), Tags(Vec<String>), OpenSource(Later<bool>), Addon { id: Value, file_name: Value, kind: Option<AddonKind>, url: Value, path: Value, version: Value, hashes: PackageAddonHashes<Value>, }, Set(Later<String>, Value), Require(Vec<Vec<Package>>), Refuse(Value), Recommend(bool, Value), Bundle(Value), Compat(Value, Value), Extend(Value), Finish(), Fail(Option<FailReason>), Notice(Value), Cmd(Vec<Value>), Call(Later<String>), Custom(Later<String>, Vec<String>),
}
Expand description

Type of an instruction

Variants§

§

If

Check conditions

Fields

§condition: Condition

The condition to check

§if_block: BlockId

The block to run if the condition succeeds

§else_blocks: Vec<ElseBlock>

The chain of else blocks to run if the initial condition fails

§

Name(Later<String>)

Set the package name metadata

§

Description(Later<String>)

Set the package description metadata

§

LongDescription(Later<String>)

Set the package long description metadata

§

Authors(Vec<String>)

Set the package authors metadata

§

PackageMaintainers(Vec<String>)

Set the package maintainers metadata

§

Website(Later<String>)

Set the package website metadata

Set the package support link metadata

§

Documentation(Later<String>)

Set the package documentation metadata

§

Source(Later<String>)

Set the package source metadata

§

Issues(Later<String>)

Set the package issues metadata

§

Community(Later<String>)

Set the package community metadata

§

Icon(Later<String>)

Set the package icon metadata

§

Banner(Later<String>)

Set the package banner metadata

§

Gallery(Vec<String>)

Set the package gallery metadata

§

License(Later<String>)

Set the package license metadata

§

Keywords(Vec<String>)

Set the package keywords metadata

§

Categories(Vec<String>)

Set the package categories metadata

§

Features(Vec<String>)

Set the package features property

§

DefaultFeatures(Vec<String>)

Set the package default features property

§

ContentVersions(Vec<String>)

Set the package content versions property

§

ModrinthID(Later<String>)

Set the package Modrinth ID property

§

CurseForgeID(Later<String>)

Set the package CurseForge ID property

§

SmithedID(Later<String>)

Set the package Smithed ID property

§

SupportedVersions(Vec<VersionPattern>)

Set the package supported versions property

§

SupportedModloaders(Vec<ModloaderMatch>)

Set the package supported modloaders property

§

SupportedPluginLoaders(Vec<PluginLoaderMatch>)

Set the package supported plugin loaders property

§

SupportedSides(Vec<Side>)

Set the package supported sides property

§

SupportedOperatingSystems(Vec<OSCondition>)

Set the package supported operating systems property

§

SupportedArchitectures(Vec<ArchCondition>)

Set the package supported architectures property

§

Tags(Vec<String>)

Set the package tags property

§

OpenSource(Later<bool>)

Set the open source property

§

Addon

Install an addon

Fields

§id: Value

The ID of the addon

§file_name: Value

The filename of the addon

§kind: Option<AddonKind>

What kind of addon this is

§url: Value

The URL to the addon file; may not exist

§path: Value

The path to the addon file; may not exist

§version: Value

The version of the addon

§hashes: PackageAddonHashes<Value>

The addon’s hashes

§

Set(Later<String>, Value)

Set a variable to a value

§

Require(Vec<Vec<Package>>)

Require a package

§

Refuse(Value)

Refuse a package

§

Recommend(bool, Value)

Recommend a package

§

Bundle(Value)

Bundle a package

§

Compat(Value, Value)

Compat with a package

§

Extend(Value)

Extend a package

§

Finish()

Finish evaluation early

§

Fail(Option<FailReason>)

Fail evaluation

§

Notice(Value)

Present a notice to the user

§

Cmd(Vec<Value>)

Run a command

§

Call(Later<String>)

Call another routine

§

Custom(Later<String>, Vec<String>)

Custom implementation-specific instruction

Trait Implementations§

Source§

impl Clone for InstrKind

Source§

fn clone(&self) -> InstrKind

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for InstrKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for InstrKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.