pub struct ManifestBuilder { /* private fields */ }Expand description
Builder for creating manifests.
Implementations§
Source§impl ManifestBuilder
impl ManifestBuilder
Sourcepub fn new(name: impl Into<String>, version: impl Into<String>) -> Self
pub fn new(name: impl Into<String>, version: impl Into<String>) -> Self
Create a new manifest builder.
Sourcepub fn description(self, desc: impl Into<String>) -> Self
pub fn description(self, desc: impl Into<String>) -> Self
Set the description.
Add an author.
Sourcepub fn api_version(self, version: ApiVersion) -> Self
pub fn api_version(self, version: ApiVersion) -> Self
Set the API version.
Sourcepub fn capability(self, cap: impl Into<String>) -> Self
pub fn capability(self, cap: impl Into<String>) -> Self
Add a capability requirement.
Sourcepub fn capabilities<I, S>(self, caps: I) -> Self
pub fn capabilities<I, S>(self, caps: I) -> Self
Add capabilities.
Sourcepub fn dependency(self, dep: Dependency) -> Self
pub fn dependency(self, dep: Dependency) -> Self
Add a dependency.
Sourcepub fn build_unchecked(self) -> Manifest
pub fn build_unchecked(self) -> Manifest
Build without validation.
Auto Trait Implementations§
impl Freeze for ManifestBuilder
impl RefUnwindSafe for ManifestBuilder
impl Send for ManifestBuilder
impl Sync for ManifestBuilder
impl Unpin for ManifestBuilder
impl UnwindSafe for ManifestBuilder
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