pub struct TableConfig {
pub region: String,
pub endpoint: Option<String>,
pub delete_on_exit: bool,
pub tables: Vec<TableInfo>,
}Expand description
Represents the main configuration loaded from a YAML file.
This struct defines the overall settings for connecting to DynamoDB, including endpoint, region, and definitions for one or more tables.
Fields§
§region: StringAWS region to target. Defaults to “us-east-1” if not specified.
endpoint: Option<String>Optional local endpoint URL (e.g., “http://localhost:8000” for DynamoDB Local). If provided, the connector targets this endpoint and uses test credentials.
delete_on_exit: boolIf true and endpoint is set, created tables will be deleted
when the DynamodbConnector is dropped (requires test_utils feature).
tables: Vec<TableInfo>A list of table schemas to be managed by the connector.
Implementations§
Source§impl TableConfig
impl TableConfig
Sourcepub fn load_from_file<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn load_from_file<P: AsRef<Path>>(path: P) -> Result<Self>
Loads TableConfig from a YAML file.
Expects a top-level structure with keys like region, endpoint, tables (a list).
§Errors
Returns Err if the file cannot be read (DynamoToolsError::ConfigRead)
or if the YAML content cannot be parsed (DynamoToolsError::ConfigParse).
Trait Implementations§
Source§impl Clone for TableConfig
impl Clone for TableConfig
Source§fn clone(&self) -> TableConfig
fn clone(&self) -> TableConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TableConfig
impl Debug for TableConfig
Source§impl<'de> Deserialize<'de> for TableConfig
impl<'de> Deserialize<'de> for TableConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for TableConfig
impl RefUnwindSafe for TableConfig
impl Send for TableConfig
impl Sync for TableConfig
impl Unpin for TableConfig
impl UnsafeUnpin for TableConfig
impl UnwindSafe for TableConfig
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§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>
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>
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 more