pub struct Stack { /* private fields */ }
Expand description
Used to store and manage all resources and data sources associated with an infrastructure deployment.
Will use a mutable container to store resources and data sources.
Implementations§
Source§impl Stack
impl Stack
pub fn new(name: impl Into<String>) -> Rc<Stack>
Sourcepub fn add_provider(&self, provider: Rc<dyn Provider>)
pub fn add_provider(&self, provider: Rc<dyn Provider>)
Add provider
to this stack.
Sourcepub fn add_resource(&self, resource: Rc<dyn L1Construct>)
pub fn add_resource(&self, resource: Rc<dyn L1Construct>)
Add resource
to this stack.
Sourcepub fn add_data_source(&self, data_source: Rc<dyn L1Construct>)
pub fn add_data_source(&self, data_source: Rc<dyn L1Construct>)
Add a data source to the data source store.
Sourcepub fn to_document(&self) -> Document
pub fn to_document(&self) -> Document
Generate Terraform JSON configuration out of stored provider, resources and data sources.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Stack
impl !RefUnwindSafe for Stack
impl !Send for Stack
impl !Sync for Stack
impl Unpin for Stack
impl !UnwindSafe for Stack
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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