# 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 modify the owners of a crate.

## Auto Trait Implementations§

§

### impl<'a> RefUnwindSafe for Mutation<'a>

§

### impl<'a> Send for Mutation<'a>

§

### impl<'a> Sync for Mutation<'a>

§

### impl<'a> Unpin for Mutation<'a>

§

### impl<'a> UnwindSafe for Mutation<'a>

## 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> Same<T> for T

§

#### type Output = T

Should always be `Self`
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.
§

### impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

#### fn vzip(self) -> V

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