Struct Package

Source
pub struct Package {
    pkg: Package,
    version_slated: Option<Version>,
    published_versions: Arc<Mutex<Vec<CratesIoVersion>>>,
    data: Arc<Mutex<PackageData>>,
    metadata: XTaskPackageMetadata,
}

Fields§

§pkg: Package§version_slated: Option<Version>§published_versions: Arc<Mutex<Vec<CratesIoVersion>>>§data: Arc<Mutex<PackageData>>§metadata: XTaskPackageMetadata

Implementations§

Source§

impl Package

Source

fn check( &self, packages: &BTreeMap<String, Self>, workspace_root: &Utf8Path, base_branch: Option<&str>, ) -> Result<()>

Source

fn fix( &self, check_run: &CheckRun, workspace_root: &Utf8Path, ) -> Result<Vec<PackageChangeLog>>

Source

fn report( &self, base_package_version: Option<&Version>, package_changes: &mut Vec<String>, errors_markdown: &mut Vec<String>, fragment: Option<&mut Fragment>, ) -> Result<()>

Source§

impl Package

Source

const DEFAULT_GIT_RELEASE_BODY: &str = "{% if publish %}\n[<img alt=\"crates.io\" src=\"https://img.shields.io/badge/crates.io-v{{ version }}-orange?labelColor=5C5C5C\" height=\"20\">](https://crates.io/crates/{{ package }}/{{ version }})\n[<img alt=\"docs.rs\" src=\"https://img.shields.io/badge/docs.rs-v{{ version }}-blue?labelColor=5C5C5C\" height=\"20\">](https://docs.rs/{{ package }}/{{ version }})\n{% endif %}\n{{ changelog }}\n"

Source

const DEFAULT_GIT_TAG_NAME: &str = "{{ package }}-v{{ version }}"

Source

pub fn new( workspace_meta: &WorkspaceReleaseMetadata, pkg: Package, ) -> Result<Self>

Source

pub fn should_publish(&self) -> bool

Source

pub fn group(&self) -> &str

Source

pub fn is_dep_public(&self, name: &str) -> bool

Source

pub fn unreleased_req(&self) -> VersionReq

Source

pub fn changelog_path(&self) -> Option<Utf8PathBuf>

Source

pub fn should_git_release(&self) -> bool

Source

pub fn git_release(&self) -> Result<Option<GitRelease>>

Source

pub fn should_semver_checks(&self) -> bool

Source

pub fn should_min_version_check(&self) -> bool

Source

pub fn should_release(&self) -> bool

Source

pub fn last_published_version(&self) -> Option<CratesIoVersion>

Source

pub fn slated_for_release(&self) -> bool

Source

fn git_tag_name(&self) -> Result<String>

Source

fn git_tag_name_version(&self, version: &Version) -> Result<String>

Source

fn git_release_name(&self) -> Result<String>

Source

fn git_release_body(&self) -> Result<String>

Source

pub fn has_branch_changes(&self, base: &str) -> bool

Source

pub fn has_changed_since_publish(&self) -> Result<bool>

Source

pub fn next_version(&self) -> Option<Version>

Source

pub fn set_next_version(&self, version: Version)

Source

pub fn report_change(&self)

Source

pub fn report_breaking_change(&self)

Source

pub fn version_bump(&self) -> Option<VersionBump>

Source

pub fn published_versions(&self) -> Vec<CratesIoVersion>

Source

pub fn fetch_published(&self) -> Result<()>

Source

pub fn report_issue(&self, issue: impl Into<PackageError>)

Source

pub fn set_semver_output(&self, breaking: bool, output: String)

Source

pub fn set_min_versions_output(&self, output: String)

Source

pub fn semver_output(&self) -> Option<(bool, String)>

Source

pub fn min_versions_output(&self) -> Option<String>

Source

pub fn errors(&self) -> Vec<PackageError>

Methods from Deref<Target = Package>§

pub fn license_file(&self) -> Option<Utf8PathBuf>

Full path to the license file if one is present in the manifest

pub fn readme(&self) -> Option<Utf8PathBuf>

Full path to the readme file if one is present in the manifest

Trait Implementations§

Source§

impl Clone for Package

Source§

fn clone(&self) -> Package

Returns a copy 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 Deref for Package

Source§

type Target = Package

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.

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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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, 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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,