pub enum CloudRegion {
UsEast1,
UsEast2,
UsWest2,
EuWest1,
EuCentral1,
ApNortheast1,
ApSoutheast1,
ApSoutheast2,
Custom(String),
}Expand description
Geographic regions for cloud providers
Variants§
UsEast1
US East (Virginia)
UsEast2
US East (Ohio)
UsWest2
US West (Oregon)
EuWest1
EU West (Ireland)
EuCentral1
EU Central (Frankfurt)
ApNortheast1
Asia Pacific (Tokyo)
ApSoutheast1
Asia Pacific (Singapore)
ApSoutheast2
Asia Pacific (Sydney)
Custom(String)
Custom region
Implementations§
Source§impl CloudRegion
impl CloudRegion
Sourcepub fn from_string(s: &str) -> Self
pub fn from_string(s: &str) -> Self
Creates a region from a string identifier
Sourcepub fn azure_code(&self) -> &str
pub fn azure_code(&self) -> &str
Returns the Azure region code
Sourcepub fn estimated_latency_to(&self, other: &Self) -> u32
pub fn estimated_latency_to(&self, other: &Self) -> u32
Calculates approximate latency to another region in milliseconds
Trait Implementations§
Source§impl Clone for CloudRegion
impl Clone for CloudRegion
Source§fn clone(&self) -> CloudRegion
fn clone(&self) -> CloudRegion
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CloudRegion
impl Debug for CloudRegion
Source§impl Hash for CloudRegion
impl Hash for CloudRegion
Source§impl PartialEq for CloudRegion
impl PartialEq for CloudRegion
impl Eq for CloudRegion
impl StructuralPartialEq for CloudRegion
Auto Trait Implementations§
impl Freeze for CloudRegion
impl RefUnwindSafe for CloudRegion
impl Send for CloudRegion
impl Sync for CloudRegion
impl Unpin for CloudRegion
impl UnsafeUnpin for CloudRegion
impl UnwindSafe for CloudRegion
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.