pub struct CloudMapping {
pub provider: String,
pub account_id: String,
pub region: Option<String>,
}Expand description
Represents a cloud provider mapping for synced resources.
Fields§
§provider: StringCloud provider name (aws, gcp, azure, scaleway, etc.)
account_id: StringProvider-specific account ID
region: Option<String>Optional region/location (us-east-1, us-central1, global, etc.) None indicates a global resource or region-independent resource
Implementations§
Source§impl CloudMapping
impl CloudMapping
Sourcepub fn new(
provider: impl Into<String>,
account_id: impl Into<String>,
) -> CloudMapping
pub fn new( provider: impl Into<String>, account_id: impl Into<String>, ) -> CloudMapping
Creates a new cloud mapping without a region (global resource).
Sourcepub fn with_region(
provider: impl Into<String>,
account_id: impl Into<String>,
region: impl Into<String>,
) -> CloudMapping
pub fn with_region( provider: impl Into<String>, account_id: impl Into<String>, region: impl Into<String>, ) -> CloudMapping
Creates a new cloud mapping with a specific region.
Sourcepub fn is_regional(&self) -> bool
pub fn is_regional(&self) -> bool
Returns true if this mapping has a region specified.
Sourcepub fn region_or_global(&self) -> &str
pub fn region_or_global(&self) -> &str
Returns the region, or “global” if none is specified.
Trait Implementations§
Source§impl Clone for CloudMapping
impl Clone for CloudMapping
Source§fn clone(&self) -> CloudMapping
fn clone(&self) -> CloudMapping
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CloudMapping
impl Debug for CloudMapping
Source§impl<'de> Deserialize<'de> for CloudMapping
impl<'de> Deserialize<'de> for CloudMapping
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CloudMapping, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CloudMapping, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CloudMapping
Source§impl Hash for CloudMapping
impl Hash for CloudMapping
Source§impl PartialEq for CloudMapping
impl PartialEq for CloudMapping
Source§impl Serialize for CloudMapping
impl Serialize for CloudMapping
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for CloudMapping
Auto Trait Implementations§
impl Freeze for CloudMapping
impl RefUnwindSafe for CloudMapping
impl Send for CloudMapping
impl Sync for CloudMapping
impl Unpin for CloudMapping
impl UnsafeUnpin for CloudMapping
impl UnwindSafe for CloudMapping
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