pub struct Package {
pub name: PackageName,
pub group: GroupName,
pub kind: PackageKind,
pub author: Option<String>,
pub description: Option<String>,
pub repository: Option<String>,
/* private fields */
}
Expand description
A Package
represents a single published item in Fluvio’s registry.
Each time you publish an updated version of a package, that version is
known as a Release
.
A package has a specified type, and all releases of that package must be the same type.
Fields§
§name: PackageName
The unique name of this package
group: GroupName
The ID of the group that published the package
kind: PackageKind
The type of package this is
The author of this package
description: Option<String>
The human-readable description of this package
repository: Option<String>
A link to the source code repository of this package
Implementations§
Source§impl Package
impl Package
pub fn new_binary<V>( id: &PackageId<V>, author: impl Into<String>, desc: impl Into<String>, repo: impl Into<String>, ) -> Self
Sourcepub fn latest_release(&self) -> Result<&Release>
pub fn latest_release(&self) -> Result<&Release>
Returns a reference to the latest release for this package
Sourcepub fn latest_release_for_target(
&self,
target: &Target,
prerelease: bool,
) -> Result<&Release>
pub fn latest_release_for_target( &self, target: &Target, prerelease: bool, ) -> Result<&Release>
Returns a reference to the latest release with this target
If prerelease
is false, this will return only the latest release
whose version does not include a prerelease tag.
Sourcepub fn add_release(&mut self, version: Version, target: Target) -> Result<()>
pub fn add_release(&mut self, version: Version, target: Target) -> Result<()>
Adds a new release to this package. This will reject a release if a release by the same version exists.