pub struct ManifestBuilder { /* private fields */ }
Expand description

Builder for Manifest.

Implementations§

source§

impl ManifestBuilder

source

pub fn name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

source

pub fn version(&mut self, value: Version) -> &mut Self

source

pub fn description<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

source

pub fn homepage<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

source

pub fn license<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

source

pub fn bugs(&mut self, value: Bugs) -> &mut Self

source

pub fn keywords(&mut self, value: Vec<String>) -> &mut Self

source

pub fn bin(&mut self, value: Bin) -> &mut Self

source

pub fn author(&mut self, value: PersonField) -> &mut Self

source

pub fn contributors(&mut self, value: Vec<PersonField>) -> &mut Self

source

pub fn files(&mut self, value: Option<Vec<String>>) -> &mut Self

source

pub fn main<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

source

pub fn man(&mut self, value: Man) -> &mut Self

source

pub fn directories(&mut self, value: Option<Directories>) -> &mut Self

source

pub fn module_type<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

source

pub fn exports(&mut self, value: Exports) -> &mut Self

source

pub fn imports(&mut self, value: Imports) -> &mut Self

source

pub fn repository(&mut self, value: Repository) -> &mut Self

source

pub fn scripts(&mut self, value: HashMap<String, String>) -> &mut Self

source

pub fn config(&mut self, value: Value) -> &mut Self

source

pub fn engines(&mut self, value: HashMap<String, Range>) -> &mut Self

source

pub fn os(&mut self, value: Vec<String>) -> &mut Self

source

pub fn cpu(&mut self, value: Vec<String>) -> &mut Self

source

pub fn private(&mut self, value: bool) -> &mut Self

source

pub fn publish_config(&mut self, value: HashMap<String, Value>) -> &mut Self

source

pub fn dependencies(&mut self, value: BTreeMap<String, String>) -> &mut Self

source

pub fn dev_dependencies(&mut self, value: BTreeMap<String, String>) -> &mut Self

source

pub fn optional_dependencies( &mut self, value: BTreeMap<String, String> ) -> &mut Self

source

pub fn peer_dependencies( &mut self, value: BTreeMap<String, String> ) -> &mut Self

source

pub fn bundled_dependencies(&mut self, value: Vec<String>) -> &mut Self

source

pub fn workspaces(&mut self, value: Vec<String>) -> &mut Self

source

pub fn _rest(&mut self, value: HashMap<String, Value>) -> &mut Self

source

pub fn build(&self) -> Result<Manifest, ManifestBuilderError>

Builds a new Manifest.

Errors

If a required field has not been initialized.

Trait Implementations§

source§

impl Clone for ManifestBuilder

source§

fn clone(&self) -> ManifestBuilder

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 Default for ManifestBuilder

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · 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<T> ToOwned for Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.