Struct aws_runtime::env_config::file::Builder
source · pub struct Builder { /* private fields */ }
Expand description
Builder for EnvConfigFiles
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn include_default_config_file(
self,
include_default_config_file: bool,
) -> Self
pub fn include_default_config_file( self, include_default_config_file: bool, ) -> Self
Include the default SDK config file in the list of profile files to be loaded.
The default SDK config typically resides in ~/.aws/config
. When this flag is enabled,
this config file will be included in the profile files that get loaded in the built
EnvConfigFiles
file set.
This flag defaults to false
when using the builder to construct EnvConfigFiles
.
sourcepub fn include_default_credentials_file(
self,
include_default_credentials_file: bool,
) -> Self
pub fn include_default_credentials_file( self, include_default_credentials_file: bool, ) -> Self
Include the default SDK credentials file in the list of profile files to be loaded.
The default SDK credentials typically reside in ~/.aws/credentials
. When this flag is enabled,
this credentials file will be included in the profile files that get loaded in the built
EnvConfigFiles
file set.
This flag defaults to false
when using the builder to construct EnvConfigFiles
.
sourcepub fn with_file(
self,
kind: EnvConfigFileKind,
file: impl Into<PathBuf>,
) -> Self
pub fn with_file( self, kind: EnvConfigFileKind, file: impl Into<PathBuf>, ) -> Self
Include a custom file
in the list of profile files to be loaded.
The kind
informs the parser how to treat the file. If it’s intended to be like
the SDK credentials file typically in ~/.aws/config
, then use EnvConfigFileKind::Config
.
Otherwise, use EnvConfigFileKind::Credentials
.
sourcepub fn with_contents(
self,
kind: EnvConfigFileKind,
contents: impl Into<String>,
) -> Self
pub fn with_contents( self, kind: EnvConfigFileKind, contents: impl Into<String>, ) -> Self
Include custom file contents
in the list of profile files to be loaded.
The kind
informs the parser how to treat the file. If it’s intended to be like
the SDK credentials file typically in ~/.aws/config
, then use EnvConfigFileKind::Config
.
Otherwise, use EnvConfigFileKind::Credentials
.
sourcepub fn build(self) -> EnvConfigFiles
pub fn build(self) -> EnvConfigFiles
Build the EnvConfigFiles
file set.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)