Enum cargo::util::auth::Mutation

source ·
pub enum Mutation<'a> {
    PrePublish,
    Publish {
        name: &'a str,
        vers: &'a str,
        cksum: &'a str,
    },
    Yank {
        name: &'a str,
        vers: &'a str,
    },
    Unyank {
        name: &'a str,
        vers: &'a str,
    },
    Owners {
        name: &'a str,
    },
}
Expand description

A record of what kind of operation is happening that we should generate a token for.

Variants§

§

PrePublish

Before we generate a crate file for the users attempt to publish, we need to check if we are configured correctly to generate a token. This variant is used to make sure that we can generate a token, to error out early if the token is not configured correctly.

§

Publish

Fields

§name: &'a str

The name of the crate

§vers: &'a str

The version of the crate

§cksum: &'a str

The checksum of the crate file being uploaded

The user is attempting to publish a crate.

§

Yank

Fields

§name: &'a str

The name of the crate

§vers: &'a str

The version of the crate

The user is attempting to yank a crate.

§

Unyank

Fields

§name: &'a str

The name of the crate

§vers: &'a str

The version of the crate

The user is attempting to unyank a crate.

§

Owners

Fields

§name: &'a str

The name of the crate

The user is attempting to unyank a crate.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 56 bytes

Size for each variant:

  • PrePublish: 0 bytes
  • Publish: 48 bytes
  • Yank: 32 bytes
  • Unyank: 32 bytes
  • Owners: 16 bytes