#[non_exhaustive]pub struct ModuleCall {
pub address: Address,
pub source_raw: Arc<str>,
pub source: ModuleSource,
pub resolved: Option<ModuleId>,
pub providers: Vec<(Arc<str>, ProviderRef)>,
pub inputs: AttributeMap,
pub count_expr: Option<Expression>,
pub for_each_expr: Option<Expression>,
pub span: Span,
}Expand description
A module "name" { source = "..."; ... } call site.
Field order matches [10-data-model.md § 2.2].
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.address: AddressFull TF address of the call (e.g. module.pacer_db).
source_raw: Arc<str>Verbatim source string from the HCL.
source: ModuleSourceClassified source.
resolved: Option<ModuleId>Set by the graph phase once the source has been resolved to a
Module in the registry.
providers: Vec<(Arc<str>, ProviderRef)>providers = { aws = aws.main } rewrites the call site applies.
inputs: AttributeMapInput expressions passed into the module.
count_expr: Option<Expression>count = ... expression.
for_each_expr: Option<Expression>for_each = ... expression.
span: SpanSpan of the opening module keyword.
Implementations§
Source§impl ModuleCall
impl ModuleCall
Sourcepub fn builder() -> ModuleCallBuilder<((), (), (), (), (), (), (), (), ())>
pub fn builder() -> ModuleCallBuilder<((), (), (), (), (), (), (), (), ())>
Create a builder for building ModuleCall.
On the builder, call .address(...), .source_raw(...), .source(...), .resolved(...)(optional), .providers(...)(optional), .inputs(...)(optional), .count_expr(...)(optional), .for_each_expr(...)(optional), .span(...) to set the values of the fields.
Finally, call .build() to create the instance of ModuleCall.
Trait Implementations§
Source§impl Clone for ModuleCall
impl Clone for ModuleCall
Source§fn clone(&self) -> ModuleCall
fn clone(&self) -> ModuleCall
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 ModuleCall
impl Debug for ModuleCall
Source§impl<'de> Deserialize<'de> for ModuleCall
impl<'de> Deserialize<'de> for ModuleCall
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>,
Source§impl PartialEq for ModuleCall
impl PartialEq for ModuleCall
Source§fn eq(&self, other: &ModuleCall) -> bool
fn eq(&self, other: &ModuleCall) -> bool
self and other values to be equal, and is used by ==.