Enum cargo_registry::uploaders::Uploader [] [src]

pub enum Uploader {
    S3 {
        bucket: Bucket,
        proxy: Option<String>,
    },
    Local,
    NoOp,
}

Variants

For production usage, uploads and redirects to s3. For test usage with a proxy.

Fields of S3

For development usage only: "uploads" crate files to dist and serves them from there as well to enable local publishing and download

For one-off scripts where creating a Config is needed, but uploading is not.

Methods

impl Uploader
[src]

[src]

[src]

Returns the URL of an uploaded crate's version archive.

The function doesn't check for the existence of the file. It returns None if the current Uploader is NoOp.

[src]

Returns the URL of an uploaded crate's version readme.

The function doesn't check for the existence of the file. It returns None if the current Uploader is NoOp.

[src]

Returns the interna path of an uploaded crate's version archive.

[src]

Returns the interna path of an uploaded crate's version readme.

[src]

Uploads a file using the configured uploader (either S3, Local or NoOp).

It returns a a tuple containing the path of the uploaded file and its checksum.

[src]

Uploads a crate and its readme. Returns the checksum of the uploaded crate file, and bombs for the uploaded crate and the uploaded readme.

[src]

Deletes an uploaded file.

Trait Implementations

impl Clone for Uploader
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Uploader
[src]

[src]

Formats the value using the given formatter.