pub fn from_str<T>(s: &str, ctx: &Context<'_>) -> Result<T>where
T: DeserializeOwned,
Expand description
Deserialize an instance of type T
from a string of HCL text and evaluate all expressions
using the given context.
See the module level documentation for a usage example.
ยงErrors
This function fails with an error if:
- the string
s
cannot be parsed as HCL. - any condition described in the error section of the
evaluate
method documentation meets. - the evaluated value cannot be deserialized as a
T
.