DependableTrait
Trait for IDependable.
Traits are interfaces that are privately implemented by objects. Instead of showing up in the public interface of a class, they need to be queried explicitly. This is used to implement certain framework features that are not intended to be used by Construct consumers, and so should be hidden from accidental use.
Example
# Example automatically generated from non-compiling source. May contain errors.
# Usage
roots = DependableTrait.get(construct).dependency_roots
# Definition
DependableTrait.implement(construct, get dependencyRoots() { return []; }
)
Initializers
import ros_cdk_core
ros_cdk_core.DependableTrait()
Name | Type | Description |
---|---|---|
Static Functions
Name | Description |
---|---|
get |
Return the matching DependableTrait for the given class instance. |
implement |
Register instance to have the given DependableTrait. |
get
import ros_cdk_core
ros_cdk_core.DependableTrait.get(
instance: IDependable
)
Return the matching DependableTrait for the given class instance.
- Type: IDependable
implement
import ros_cdk_core
ros_cdk_core.DependableTrait.implement(
instance: IDependable,
trait: DependableTrait
)
Register instance
to have the given DependableTrait.
Should be called in the class constructor.
- Type: IDependable
- Type: DependableTrait
Properties
Name | Type | Description |
---|---|---|
dependency_roots |
typing.List[IConstruct] |
The set of constructs that form the root of this dependable. |
dependency_roots
Required
dependency_roots: typing.List[IConstruct]
- Type: typing.List[IConstruct]
The set of constructs that form the root of this dependable.
All resources under all returned constructs are included in the ordering dependency.