#[non_exhaustive]pub struct Builder { /* private fields */ }
Expand description
A builder for PackageVersionDescription
Implementations
sourceimpl Builder
impl Builder
sourcepub fn format(self, input: PackageFormat) -> Self
pub fn format(self, input: PackageFormat) -> Self
The format of the package version. The valid package formats are:
-
npm
: A Node Package Manager (npm) package. -
pypi
: A Python Package Index (PyPI) package. -
maven
: A Maven package that contains compiled code in a distributable format, such as a JAR file.
sourcepub fn set_format(self, input: Option<PackageFormat>) -> Self
pub fn set_format(self, input: Option<PackageFormat>) -> Self
The format of the package version. The valid package formats are:
-
npm
: A Node Package Manager (npm) package. -
pypi
: A Python Package Index (PyPI) package. -
maven
: A Maven package that contains compiled code in a distributable format, such as a JAR file.
sourcepub fn namespace(self, input: impl Into<String>) -> Self
pub fn namespace(self, input: impl Into<String>) -> Self
The namespace of the package. The package component that specifies its namespace depends on its type. For example:
-
The namespace of a Maven package is its
groupId
. -
The namespace of an npm package is its
scope
. -
A Python package does not contain a corresponding component, so Python packages do not have a namespace.
sourcepub fn set_namespace(self, input: Option<String>) -> Self
pub fn set_namespace(self, input: Option<String>) -> Self
The namespace of the package. The package component that specifies its namespace depends on its type. For example:
-
The namespace of a Maven package is its
groupId
. -
The namespace of an npm package is its
scope
. -
A Python package does not contain a corresponding component, so Python packages do not have a namespace.
sourcepub fn package_name(self, input: impl Into<String>) -> Self
pub fn package_name(self, input: impl Into<String>) -> Self
The name of the requested package.
sourcepub fn set_package_name(self, input: Option<String>) -> Self
pub fn set_package_name(self, input: Option<String>) -> Self
The name of the requested package.
sourcepub fn display_name(self, input: impl Into<String>) -> Self
pub fn display_name(self, input: impl Into<String>) -> Self
The name of the package that is displayed. The displayName
varies depending on the package version's format. For example, if an npm package is named ui
, is in the namespace vue
, and has the format npm
, then the displayName
is @vue/ui
.
sourcepub fn set_display_name(self, input: Option<String>) -> Self
pub fn set_display_name(self, input: Option<String>) -> Self
The name of the package that is displayed. The displayName
varies depending on the package version's format. For example, if an npm package is named ui
, is in the namespace vue
, and has the format npm
, then the displayName
is @vue/ui
.
sourcepub fn set_version(self, input: Option<String>) -> Self
pub fn set_version(self, input: Option<String>) -> Self
The version of the package.
sourcepub fn summary(self, input: impl Into<String>) -> Self
pub fn summary(self, input: impl Into<String>) -> Self
A summary of the package version. The summary is extracted from the package. The information in and detail level of the summary depends on the package version's format.
sourcepub fn set_summary(self, input: Option<String>) -> Self
pub fn set_summary(self, input: Option<String>) -> Self
A summary of the package version. The summary is extracted from the package. The information in and detail level of the summary depends on the package version's format.
sourcepub fn home_page(self, input: impl Into<String>) -> Self
pub fn home_page(self, input: impl Into<String>) -> Self
The homepage associated with the package.
sourcepub fn set_home_page(self, input: Option<String>) -> Self
pub fn set_home_page(self, input: Option<String>) -> Self
The homepage associated with the package.
sourcepub fn source_code_repository(self, input: impl Into<String>) -> Self
pub fn source_code_repository(self, input: impl Into<String>) -> Self
The repository for the source code in the package version, or the source code used to build it.
sourcepub fn set_source_code_repository(self, input: Option<String>) -> Self
pub fn set_source_code_repository(self, input: Option<String>) -> Self
The repository for the source code in the package version, or the source code used to build it.
sourcepub fn published_time(self, input: DateTime) -> Self
pub fn published_time(self, input: DateTime) -> Self
A timestamp that contains the date and time the package version was published.
sourcepub fn set_published_time(self, input: Option<DateTime>) -> Self
pub fn set_published_time(self, input: Option<DateTime>) -> Self
A timestamp that contains the date and time the package version was published.
sourcepub fn licenses(self, input: LicenseInfo) -> Self
pub fn licenses(self, input: LicenseInfo) -> Self
Appends an item to licenses
.
To override the contents of this collection use set_licenses
.
Information about licenses associated with the package version.
sourcepub fn set_licenses(self, input: Option<Vec<LicenseInfo>>) -> Self
pub fn set_licenses(self, input: Option<Vec<LicenseInfo>>) -> Self
Information about licenses associated with the package version.
sourcepub fn set_revision(self, input: Option<String>) -> Self
pub fn set_revision(self, input: Option<String>) -> Self
The revision of the package version.
sourcepub fn status(self, input: PackageVersionStatus) -> Self
pub fn status(self, input: PackageVersionStatus) -> Self
A string that contains the status of the package version. It can be one of the following:
-
Published
-
Unfinished
-
Unlisted
-
Archived
-
Disposed
sourcepub fn set_status(self, input: Option<PackageVersionStatus>) -> Self
pub fn set_status(self, input: Option<PackageVersionStatus>) -> Self
A string that contains the status of the package version. It can be one of the following:
-
Published
-
Unfinished
-
Unlisted
-
Archived
-
Disposed
sourcepub fn build(self) -> PackageVersionDescription
pub fn build(self) -> PackageVersionDescription
Consumes the builder and constructs a PackageVersionDescription
Trait Implementations
impl StructuralPartialEq for Builder
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more