pub struct Heredoc {
    pub delimiter: Identifier,
    pub template: String,
    pub strip: HeredocStripMode,
}Expand description
A heredoc template expression is introduced by a << sequence and defines a template via a
multi-line sequence terminated by a user-chosen delimiter.
Fields§
§delimiter: IdentifierThe delimiter identifier that denotes the heredoc start and end.
template: StringThe raw template contained in the heredoc.
strip: HeredocStripModeThe heredoc strip mode.
Implementations§
source§impl Heredoc
 
impl Heredoc
sourcepub fn new<T>(delimiter: Identifier, template: T) -> Heredocwhere
    T: Into<String>,
 
pub fn new<T>(delimiter: Identifier, template: T) -> Heredocwhere
    T: Into<String>,
Creates a new Heredoc with the provided delimiter and template body.
sourcepub fn with_strip_mode(self, strip: HeredocStripMode) -> Heredoc
 
pub fn with_strip_mode(self, strip: HeredocStripMode) -> Heredoc
Sets the heredoc strip mode to use on the template.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Heredoc
 
impl<'de> Deserialize<'de> for Heredoc
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Format for Heredoc
 
impl Format for Heredoc
source§fn format<W>(&self, fmt: &mut Formatter<'_, W>) -> Result<()>where
    W: Write,
 
fn format<W>(&self, fmt: &mut Formatter<'_, W>) -> Result<()>where
    W: Write,
Formats a HCL structure using a formatter and writes the result to the provided writer. Read more
source§impl From<Heredoc> for Expression
 
impl From<Heredoc> for Expression
source§impl From<Heredoc> for TemplateExpr
 
impl From<Heredoc> for TemplateExpr
source§impl<'de> IntoDeserializer<'de, Error> for Heredoc
 
impl<'de> IntoDeserializer<'de, Error> for Heredoc
§type Deserializer = MapAccessDeserializer<HeredocAccess>
 
type Deserializer = MapAccessDeserializer<HeredocAccess>
The type of the deserializer being converted into.
source§fn into_deserializer(self) -> Self::Deserializer
 
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
source§impl PartialEq<Heredoc> for Heredoc
 
impl PartialEq<Heredoc> for Heredoc
impl Eq for Heredoc
impl StructuralEq for Heredoc
impl StructuralPartialEq for Heredoc
Auto Trait Implementations§
impl RefUnwindSafe for Heredoc
impl Send for Heredoc
impl Sync for Heredoc
impl Unpin for Heredoc
impl UnwindSafe for Heredoc
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized,
 
impl<Q, K> Equivalent<K> for Qwhere
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.