Skip to main content

Cargo

Struct Cargo 

Source
pub struct Cargo { /* private fields */ }

Implementations§

Source§

impl Cargo

Auto-generated by derive_getters::Getters.

Source

pub fn config(&self) -> &Config

Get field config from instance of Cargo.

Source

pub fn version(&self) -> &Version

Get field version from instance of Cargo.

Source

pub fn logger(&self) -> &Logger

Get field logger from instance of Cargo.

Source

pub fn env(&self) -> &HashMap<String, String>

Get field env from instance of Cargo.

Source

pub fn updated(&self) -> &bool

Get field updated from instance of Cargo.

Source

pub fn dry_run(&self) -> &bool

Get field dry_run from instance of Cargo.

Source§

impl Cargo

Source

pub fn init( config: Config, version: Version, level: LogLevel, env: HashMap<String, String>, updated: bool, dry_run: bool, ) -> Result<Self, Alert>

Initialize the plugin with the data from the cli arguments.

Source

pub fn install(&self) -> Result<(), Alert>

Install cargo-edit to use for bumping the version in Cargo.toml.

Source

pub fn set_version(&self) -> Result<(), Alert>

Run cargo set-version to bump the version in Cargo.toml.

Source

pub fn publish(&self, dry_run: bool) -> Result<(), Alert>

Run cargo publish to publish the crate to crates.io. Can do a dry run for testing.

Source

pub fn release(&self) -> Result<(), Alert>

Run the full release process for cargo.

Auto Trait Implementations§

§

impl Freeze for Cargo

§

impl RefUnwindSafe for Cargo

§

impl Send for Cargo

§

impl Sync for Cargo

§

impl Unpin for Cargo

§

impl UnsafeUnpin for Cargo

§

impl UnwindSafe for Cargo

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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<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.