[][src]Enum s3::region::Region

pub enum Region {
    UsEast1,
    UsEast2,
    UsWest1,
    UsWest2,
    CaCentral1,
    ApSouth1,
    ApNortheast1,
    ApNortheast2,
    ApNortheast3,
    ApSoutheast1,
    ApSoutheast2,
    CnNorth1,
    CnNorthwest1,
    EuCentral1,
    EuWest1,
    EuWest2,
    EuWest3,
    SaEast1,
    DoNyc3,
    DoAms3,
    DoSgp1,
    Custom {
        region: String,
        endpoint: String,
    },
}

AWS S3 region identifier, passing in custom values is also possible, in that case it is up to you to pass a valid endpoint, otherwise boom will happen :)

Example

use std::str::FromStr;
use s3::region::Region;

// Parse from a string
let region: Region = "us-east-1".parse().unwrap();

// Choose region directly
let region = Region::EuWest2;

// Custom region requires valid region name and endpoint
let region_name = "nl-ams".to_string();
let endpoint = "https://s3.nl-ams.scw.cloud".to_string();
let region = Region::Custom { region: region_name, endpoint };

Variants

UsEast1

us-east-1

UsEast2

us-east-2

UsWest1

us-west-1

UsWest2

us-west-2

CaCentral1

ca-central-1

ApSouth1

ap-south-1

ApNortheast1

ap-northeast-1

ApNortheast2

ap-northeast-2

ApNortheast3

ap-northeast-3

ApSoutheast1

ap-southeast-1

ApSoutheast2

ap-southeast-2

CnNorth1

cn-north-1

CnNorthwest1

cn-northwest-1

EuCentral1

eu-central-1

EuWest1

eu-west-1

EuWest2

eu-west-2

EuWest3

eu-west-3

SaEast1

sa-east-1

DoNyc3

Digital Ocean nyc3

DoAms3

Digital Ocean ams3

DoSgp1

Digital Ocean sgp1

Custom

Custom region

Fields of Custom

region: Stringendpoint: String

Methods

impl Region[src]

pub fn endpoint(&self) -> String[src]

pub fn scheme(&self) -> String[src]

pub fn host(&self) -> String[src]

Trait Implementations

impl Eq for Region[src]

impl Clone for Region[src]

impl PartialEq<Region> for Region[src]

impl Display for Region[src]

impl Debug for Region[src]

impl FromStr for Region[src]

type Err = Error

The associated error which can be returned from parsing.

Auto Trait Implementations

impl Unpin for Region

impl Sync for Region

impl Send for Region

impl UnwindSafe for Region

impl RefUnwindSafe for Region

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Erased for T

impl<'a, T> TryFrom<&'a str> for T where
    T: FromStr

type Err = <T as FromStr>::Err

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err