#[non_exhaustive]pub struct ProviderContext {
pub profile_map: Arc<ProfileMap>,
pub default_region: Option<Region>,
pub strict: bool,
}Expand description
Per-resolution context — Arc<ProfileMap> plus operator-driven flags.
Per spec § 2.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.profile_map: Arc<ProfileMap>Profile-name → account/region/role map.
default_region: Option<Region>Default region used when no other resolution succeeds. CLI binds
--region here; otherwise None.
strict: boolWhen true, any profile referenced from source that is not in
the profile map raises ProviderError::StrictUnresolved from
DefaultProviderResolver::resolve; otherwise we emit a single
diagnostic per distinct profile (I-PROV-2).
Implementations§
Source§impl ProviderContext
impl ProviderContext
Sourcepub fn new(profile_map: Arc<ProfileMap>) -> Self
pub fn new(profile_map: Arc<ProfileMap>) -> Self
Construct a context with the spec defaults (strict = false,
no default region).
Trait Implementations§
Source§impl Clone for ProviderContext
impl Clone for ProviderContext
Source§fn clone(&self) -> ProviderContext
fn clone(&self) -> ProviderContext
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 moreAuto Trait Implementations§
impl Freeze for ProviderContext
impl RefUnwindSafe for ProviderContext
impl Send for ProviderContext
impl Sync for ProviderContext
impl Unpin for ProviderContext
impl UnsafeUnpin for ProviderContext
impl UnwindSafe for ProviderContext
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