Skip to main content

HasAttributes

Trait HasAttributes 

Source
pub trait HasAttributes {
    // Required method
    fn attributes(&self) -> &[IacAttribute];

    // Provided methods
    fn input_attributes(&self) -> Vec<&IacAttribute> { ... }
    fn output_attributes(&self) -> Vec<&IacAttribute> { ... }
    fn required_attribute_names(&self) -> Vec<&str> { ... }
    fn sensitive_attribute_names(&self) -> Vec<&str> { ... }
}
Expand description

Common attribute queries shared by both resources and data sources.

Provides default implementations for filtering attributes by various properties. Implementors only need to supply attributes().

Required Methods§

Source

fn attributes(&self) -> &[IacAttribute]

The full list of attributes on this IR type.

Provided Methods§

Source

fn input_attributes(&self) -> Vec<&IacAttribute>

Attributes that are user-provided inputs (not purely computed).

Includes required, optional, and optional+computed attributes. Excludes purely computed attributes (computed=true, optional=false, required=false).

Source

fn output_attributes(&self) -> Vec<&IacAttribute>

Attributes that appear in the output/state (computed or required).

Source

fn required_attribute_names(&self) -> Vec<&str>

Required attribute canonical names.

Source

fn sensitive_attribute_names(&self) -> Vec<&str>

Sensitive attribute canonical names.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§