Struct release_utils::Package
source · pub struct Package { /* private fields */ }Expand description
A package in the workspace.
Implementations§
source§impl Package
impl Package
sourcepub fn new<S>(name: S) -> Self
pub fn new<S>(name: S) -> Self
Create a Package with the given name.
This uses the current directory as the the workspace path.
sourcepub fn with_workspace<S, P>(name: S, workspace: P) -> Self
pub fn with_workspace<S, P>(name: S, workspace: P) -> Self
Create a Package with the given name and workspace.
The workspace directory should be the root of the workspace, or just the directory of the package in non-workspace projects.
sourcepub fn get_git_tag_name(&self, local_version: &str) -> String
pub fn get_git_tag_name(&self, local_version: &str) -> String
Format a package version as a git tag.
sourcepub fn get_local_version(&self) -> Result<String>
pub fn get_local_version(&self) -> Result<String>
Use the cargo_metadata crate to get the local version of a package
in the workspace.
Auto Trait Implementations§
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
Mutably borrows from an owned value. Read more