pub trait DynamicDataSource: Send + Sync {
// Required methods
fn schema(&self, diags: &mut Diagnostics) -> Option<Schema>;
fn read<'life0, 'life1, 'async_trait>(
&'life0 self,
diags: &'life1 mut Diagnostics,
config: RawValue,
provider_meta_state: RawValue,
) -> Pin<Box<dyn Future<Output = Option<RawValue>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn validate<'life0, 'life1, 'async_trait>(
&'life0 self,
diags: &'life1 mut Diagnostics,
config: RawValue,
) -> Pin<Box<dyn Future<Output = Option<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
Trait for implementing a data source without automatic serialization/deserialization
See also: DataSource
Required Methods§
Sourcefn schema(&self, diags: &mut Diagnostics) -> Option<Schema>
fn schema(&self, diags: &mut Diagnostics) -> Option<Schema>
Sourcefn read<'life0, 'life1, 'async_trait>(
&'life0 self,
diags: &'life1 mut Diagnostics,
config: RawValue,
provider_meta_state: RawValue,
) -> Pin<Box<dyn Future<Output = Option<RawValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read<'life0, 'life1, 'async_trait>(
&'life0 self,
diags: &'life1 mut Diagnostics,
config: RawValue,
provider_meta_state: RawValue,
) -> Pin<Box<dyn Future<Output = Option<RawValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Read the new state of the data source
§Arguments
diags- Diagnostics to record warnings and errors that occured during the readconfig- State as declared in the Terraform fileprovider_meta_state- State of the provider metadata as declared in the Terraform file
§Remarks
The return is ignored if there is an error in diagnostics.
If the return is None, an ad-hoc error is added to diagnostics.
Provided Methods§
Sourcefn validate<'life0, 'life1, 'async_trait>(
&'life0 self,
diags: &'life1 mut Diagnostics,
config: RawValue,
) -> Pin<Box<dyn Future<Output = Option<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn validate<'life0, 'life1, 'async_trait>(
&'life0 self,
diags: &'life1 mut Diagnostics,
config: RawValue,
) -> Pin<Box<dyn Future<Output = Option<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Validate the configuration of the data source
§Arguments
diags- Diagnostics to record warnings and errors that occured during validationconfig- State as declared in the Terraform file
§Remarks
The return is ignored if there is an error in diagnostics.
If the return is None, an ad-hoc error is added to diagnostics.