Enum cargo_registry::uploaders::Uploader
[−]
[src]
pub enum Uploader { S3 { bucket: Bucket, proxy: Option<String>, }, Local, NoOp, }
Variants
S3
For production usage, uploads and redirects to s3. For test usage with a proxy.
Fields of S3
bucket: Bucket | |
proxy: Option<String> |
Local
For development usage only: "uploads" crate files to dist
and serves them
from there as well to enable local publishing and download
NoOp
For one-off scripts where creating a Config is needed, but uploading is not.
Methods
impl Uploader
[src]
fn proxy(&self) -> Option<&str>
fn crate_location(&self, crate_name: &str, version: &str) -> Option<String>
fn upload(
&self,
req: &mut Request,
krate: &Crate,
max: u64,
vers: &Version
) -> CargoResult<(Vec<u8>, Bomb)>
&self,
req: &mut Request,
krate: &Crate,
max: u64,
vers: &Version
) -> CargoResult<(Vec<u8>, Bomb)>
fn delete(&self, app: Arc<App>, path: &str) -> CargoResult<()>
Trait Implementations
impl Clone for Uploader
[src]
fn clone(&self) -> Uploader
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more