tf_bindgen_core/
lib.rs

1mod path;
2mod stack;
3
4use ::tf_bindgen_schema::document::Resource;
5
6pub use crate::path::Path;
7pub use crate::stack::Stack;
8
9pub trait Scope {
10    /// Returns the stack an object is associated with.
11    fn stack(&self) -> Stack;
12
13    /// Returns the object path of `self`.
14    fn path(&self) -> Path;
15}
16
17pub trait L1Construct: Scope {
18    /// Returns the resource type and configuration of this construct.
19    fn to_schema(&self) -> (String, Resource);
20}
21
22pub trait Provider: Scope {
23    /// Returns the provider version and configuration.
24    fn to_schema(&self) -> (String, tf_bindgen_schema::document::Provider);
25}