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: Identifier
The delimiter identifier that denotes the heredoc start and end.
template: String
The raw template contained in the heredoc.
strip: HeredocStripMode
The heredoc strip mode.
Implementations§
Source§impl Heredoc
impl Heredoc
Sourcepub fn new<T>(delimiter: Identifier, template: T) -> Heredoc
pub fn new<T>(delimiter: Identifier, template: T) -> Heredoc
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 HeredocTemplate
impl From<Heredoc> for HeredocTemplate
Source§impl From<Heredoc> for TemplateExpr
impl From<Heredoc> for TemplateExpr
Source§impl From<HeredocTemplate> for Heredoc
impl From<HeredocTemplate> for Heredoc
Source§fn from(value: HeredocTemplate) -> Self
fn from(value: HeredocTemplate) -> Self
Converts to this type from the input type.
Source§impl<'de> IntoDeserializer<'de, Error> for Heredoc
impl<'de> IntoDeserializer<'de, Error> for Heredoc
Source§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.
impl Eq for Heredoc
impl StructuralPartialEq for Heredoc
Auto Trait Implementations§
impl Freeze for Heredoc
impl RefUnwindSafe for Heredoc
impl Send for Heredoc
impl Sync for Heredoc
impl Unpin for Heredoc
impl UnwindSafe for Heredoc
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.