pub enum Type {
Bool,
Null(Option<Box<Type>>),
Integer,
Float,
String,
Buffer,
Object(ObjectDefinition),
Addon(String),
Array(Box<Type>),
Map(ObjectDefinition),
}Variants§
Bool
Null(Option<Box<Type>>)
Integer
Float
String
Buffer
Object(ObjectDefinition)
Addon(String)
Array(Box<Type>)
Map(ObjectDefinition)
Implementations§
Source§impl Type
impl Type
pub fn string() -> Type
pub fn integer() -> Type
pub fn float() -> Type
pub fn null() -> Type
pub fn typed_null(inner: Type) -> Type
pub fn bool() -> Type
pub fn object(def: ObjectDefinition) -> Type
pub fn strict_object(props: Vec<ObjectProperty>) -> Type
pub fn arbitrary_object() -> Type
pub fn documented_arbitrary_object(props: Vec<ObjectProperty>) -> Type
pub fn map(def: ObjectDefinition) -> Type
pub fn strict_map(props: Vec<ObjectProperty>) -> Type
pub fn arbitrary_map() -> Type
pub fn documented_arbitrary_map(props: Vec<ObjectProperty>) -> Type
pub fn buffer() -> Type
pub fn addon(id: &str) -> Type
pub fn array(array_item_type: Type) -> Type
pub fn check_value(&self, value: &Value) -> Result<(), Diagnostic>
pub fn as_object(&self) -> Option<&ObjectDefinition>
pub fn as_array(&self) -> Option<&Box<Type>>
pub fn as_map(&self) -> Option<&ObjectDefinition>
pub fn as_action(&self) -> Option<&String>
Sourcepub fn get_expressions_referencing_constructs<'a>(
&self,
block: &Block,
input: Box<dyn EvaluatableInput>,
dependencies: &mut Vec<(Option<Box<dyn EvaluatableInput>>, Expression)>,
)
pub fn get_expressions_referencing_constructs<'a>( &self, block: &Block, input: Box<dyn EvaluatableInput>, dependencies: &mut Vec<(Option<Box<dyn EvaluatableInput>>, Expression)>, )
This function will get attributes from the provided HCL block that match the input name.
It will collect all expressions in the block that reference other constructs, according
to the rules defined by the Type.
For example, while most types will just get the attribute value, the Object and Map types
need to look for nested blocks and properties.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Type
impl<'de> Deserialize<'de> for Type
Source§fn deserialize<D>(deserializer: D) -> Result<Type, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Type, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.