#[non_exhaustive]pub struct PackageOriginRestrictionsBuilder { /* private fields */ }
Expand description
A builder for PackageOriginRestrictions
.
Implementations§
source§impl PackageOriginRestrictionsBuilder
impl PackageOriginRestrictionsBuilder
sourcepub fn publish(self, input: AllowPublish) -> Self
pub fn publish(self, input: AllowPublish) -> Self
The package origin configuration that determines if new versions of the package can be published directly to the repository.
This field is required.sourcepub fn set_publish(self, input: Option<AllowPublish>) -> Self
pub fn set_publish(self, input: Option<AllowPublish>) -> Self
The package origin configuration that determines if new versions of the package can be published directly to the repository.
sourcepub fn get_publish(&self) -> &Option<AllowPublish>
pub fn get_publish(&self) -> &Option<AllowPublish>
The package origin configuration that determines if new versions of the package can be published directly to the repository.
sourcepub fn upstream(self, input: AllowUpstream) -> Self
pub fn upstream(self, input: AllowUpstream) -> Self
The package origin configuration that determines if new versions of the package can be added to the repository from an external connection or upstream source.
This field is required.sourcepub fn set_upstream(self, input: Option<AllowUpstream>) -> Self
pub fn set_upstream(self, input: Option<AllowUpstream>) -> Self
The package origin configuration that determines if new versions of the package can be added to the repository from an external connection or upstream source.
sourcepub fn get_upstream(&self) -> &Option<AllowUpstream>
pub fn get_upstream(&self) -> &Option<AllowUpstream>
The package origin configuration that determines if new versions of the package can be added to the repository from an external connection or upstream source.
sourcepub fn build(self) -> Result<PackageOriginRestrictions, BuildError>
pub fn build(self) -> Result<PackageOriginRestrictions, BuildError>
Consumes the builder and constructs a PackageOriginRestrictions
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for PackageOriginRestrictionsBuilder
impl Clone for PackageOriginRestrictionsBuilder
source§fn clone(&self) -> PackageOriginRestrictionsBuilder
fn clone(&self) -> PackageOriginRestrictionsBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for PackageOriginRestrictionsBuilder
impl Default for PackageOriginRestrictionsBuilder
source§fn default() -> PackageOriginRestrictionsBuilder
fn default() -> PackageOriginRestrictionsBuilder
source§impl PartialEq for PackageOriginRestrictionsBuilder
impl PartialEq for PackageOriginRestrictionsBuilder
source§fn eq(&self, other: &PackageOriginRestrictionsBuilder) -> bool
fn eq(&self, other: &PackageOriginRestrictionsBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.