pub struct DeveloperPackage {
pub package: Package,
pub filepath: PathBuf,
pub root: PathBuf,
pub includes: HashSet<String>,
}Expand description
A package that exists as source code in a working directory.
This is the equivalent of rez’s DeveloperPackage class.
It wraps a Package with additional developer-specific metadata:
- The file path of the package definition
- The root directory of the package
- Included Python modules (from
@includedecorator)
Fields§
§package: PackageThe underlying package definition.
filepath: PathBufPath to the package definition file (package.py or package.yaml).
root: PathBufRoot directory of the package (parent of filepath).
includes: HashSet<String>Module names collected from @include decorators.
Implementations§
Source§impl DeveloperPackage
impl DeveloperPackage
Sourcepub fn new(package: Package, filepath: PathBuf) -> Self
pub fn new(package: Package, filepath: PathBuf) -> Self
Create a new DeveloperPackage from a Package and its definition file path.
Sourcepub fn from_path(path: &Path) -> Result<Self, DeveloperPackageError>
pub fn from_path(path: &Path) -> Result<Self, DeveloperPackageError>
Load a DeveloperPackage from a directory path.
The directory should contain a package.py or package.yaml file.
This is equivalent to rez’s DeveloperPackage.from_path(path).
Sourcepub fn version_string(&self) -> Option<&str>
pub fn version_string(&self) -> Option<&str>
Get the package version string (if available).
Trait Implementations§
Source§impl Clone for DeveloperPackage
impl Clone for DeveloperPackage
Source§fn clone(&self) -> DeveloperPackage
fn clone(&self) -> DeveloperPackage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DeveloperPackage
impl RefUnwindSafe for DeveloperPackage
impl Send for DeveloperPackage
impl Sync for DeveloperPackage
impl Unpin for DeveloperPackage
impl UnsafeUnpin for DeveloperPackage
impl UnwindSafe for DeveloperPackage
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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