pub struct Package {Show 36 fields
pub name: String,
pub version: Option<Version>,
pub description: Option<String>,
pub authors: Vec<String>,
pub requires: Vec<String>,
pub build_requires: Vec<String>,
pub private_build_requires: Vec<String>,
pub variants: Vec<Vec<String>>,
pub tools: Vec<String>,
pub commands: Option<String>,
pub build_command: Option<String>,
pub build_system: Option<String>,
pub pre_commands: Option<String>,
pub post_commands: Option<String>,
pub pre_test_commands: Option<String>,
pub pre_build_commands: Option<String>,
pub tests: HashMap<String, String>,
pub requires_rez_version: Option<String>,
pub uuid: Option<String>,
pub config: HashMap<String, String>,
pub help: Option<String>,
pub relocatable: Option<bool>,
pub cachable: Option<bool>,
pub timestamp: Option<i64>,
pub revision: Option<String>,
pub changelog: Option<String>,
pub release_message: Option<String>,
pub previous_version: Option<Version>,
pub previous_revision: Option<String>,
pub vcs: Option<String>,
pub format_version: Option<i32>,
pub base: Option<String>,
pub has_plugins: Option<bool>,
pub plugin_for: Vec<String>,
pub hashed_variants: Option<bool>,
pub preprocess: Option<String>,
}Expand description
High-performance package representation compatible with rez
Fields§
§name: StringPackage name (non-Python version)
version: Option<Version>Package version (non-Python version)
description: Option<String>Package description (non-Python version)
Package authors (non-Python version)
requires: Vec<String>Package requirements
build_requires: Vec<String>Build requirements
private_build_requires: Vec<String>Private build requirements
variants: Vec<Vec<String>>Package variants
tools: Vec<String>Package tools
commands: Option<String>Package commands
build_command: Option<String>Build command for custom builds
build_system: Option<String>Build system type
pre_commands: Option<String>Pre commands (executed before main commands)
post_commands: Option<String>Post commands (executed after main commands)
pre_test_commands: Option<String>Pre test commands (executed before tests)
pre_build_commands: Option<String>Pre build commands (executed before build)
tests: HashMap<String, String>Package tests
requires_rez_version: Option<String>Required rez version
uuid: Option<String>Package UUID (non-Python version)
config: HashMap<String, String>Package config (non-Python version)
help: Option<String>Package help
relocatable: Option<bool>Package relocatable flag
cachable: Option<bool>Package cachable flag
timestamp: Option<i64>Package timestamp
revision: Option<String>Package revision
changelog: Option<String>Package changelog
release_message: Option<String>Package release message
previous_version: Option<Version>Previous version
previous_revision: Option<String>Previous revision
vcs: Option<String>VCS type
format_version: Option<i32>Package format version
base: Option<String>Package base
has_plugins: Option<bool>Package has plugins
plugin_for: Vec<String>Plugin for packages
hashed_variants: Option<bool>Package hashed variants
preprocess: Option<String>Package preprocess function
Implementations§
Source§impl Package
impl Package
pub fn new(name: String) -> Self
Sourcepub fn qualified_name(&self) -> String
pub fn qualified_name(&self) -> String
Get the qualified name of the package (name-version)
Sourcepub fn as_exact_requirement(&self) -> String
pub fn as_exact_requirement(&self) -> String
Get the package as an exact requirement string
Sourcepub fn is_package(&self) -> bool
pub fn is_package(&self) -> bool
Check if this is a package (always true for Package)
Sourcepub fn is_variant(&self) -> bool
pub fn is_variant(&self) -> bool
Check if this is a variant (always false for Package)
Sourcepub fn num_variants(&self) -> usize
pub fn num_variants(&self) -> usize
Get the number of variants
Sourcepub fn set_version(&mut self, version: Version)
pub fn set_version(&mut self, version: Version)
Set the package version
Sourcepub fn set_description(&mut self, description: String)
pub fn set_description(&mut self, description: String)
Set the package description
Add an author
Sourcepub fn add_requirement(&mut self, requirement: String)
pub fn add_requirement(&mut self, requirement: String)
Add a requirement
Sourcepub fn add_build_requirement(&mut self, requirement: String)
pub fn add_build_requirement(&mut self, requirement: String)
Add a build requirement
Sourcepub fn add_private_build_requirement(&mut self, requirement: String)
pub fn add_private_build_requirement(&mut self, requirement: String)
Add a private build requirement
Sourcepub fn add_variant(&mut self, variant: Vec<String>)
pub fn add_variant(&mut self, variant: Vec<String>)
Add a variant
Sourcepub fn set_commands(&mut self, commands: String)
pub fn set_commands(&mut self, commands: String)
Set commands
Sourcepub fn validate(&self) -> Result<(), RezCoreError>
pub fn validate(&self) -> Result<(), RezCoreError>
Validate the package definition
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Package
impl<'de> Deserialize<'de> for Package
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Package
impl RefUnwindSafe for Package
impl Send for Package
impl Sync for Package
impl Unpin for Package
impl UnwindSafe for Package
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more