pub struct Interpolation {
pub expr: Expression,
pub strip: Strip,
}
Expand description
An interpolation sequence evaluates an expression (written in the expression sub-language), converts the result to a string value, and replaces itself with the resulting string.
Fields§
§expr: Expression
The interpolated expression.
strip: Strip
The whitespace strip mode to use on the template elements preceeding and following after this interpolation sequence.
Implementations§
Source§impl Interpolation
impl Interpolation
Sourcepub fn new<T>(expr: T) -> Interpolationwhere
T: Into<Expression>,
pub fn new<T>(expr: T) -> Interpolationwhere
T: Into<Expression>,
Creates a new expression Interpolation
.
Sourcepub fn with_strip(self, strip: Strip) -> Interpolation
pub fn with_strip(self, strip: Strip) -> Interpolation
Sets the whitespace strip mode to use on the template elements preceeding and following
after this interpolation sequence and returns the modified Interpolation
.
Trait Implementations§
Source§impl Clone for Interpolation
impl Clone for Interpolation
Source§fn clone(&self) -> Interpolation
fn clone(&self) -> Interpolation
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Interpolation
impl Debug for Interpolation
Source§impl Format for Interpolation
impl Format for Interpolation
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<Interpolation> for Element
impl From<Interpolation> for Element
Source§fn from(interpolation: Interpolation) -> Self
fn from(interpolation: Interpolation) -> Self
Converts to this type from the input type.
Source§impl From<Interpolation> for Interpolation
impl From<Interpolation> for Interpolation
Source§fn from(value: Interpolation) -> Self
fn from(value: Interpolation) -> Self
Converts to this type from the input type.
Source§impl From<Interpolation> for Interpolation
impl From<Interpolation> for Interpolation
Source§fn from(value: Interpolation) -> Self
fn from(value: Interpolation) -> Self
Converts to this type from the input type.
Source§impl<T> From<T> for Interpolationwhere
T: Into<Expression>,
impl<T> From<T> for Interpolationwhere
T: Into<Expression>,
Source§impl PartialEq for Interpolation
impl PartialEq for Interpolation
impl Eq for Interpolation
impl StructuralPartialEq for Interpolation
Auto Trait Implementations§
impl Freeze for Interpolation
impl RefUnwindSafe for Interpolation
impl Send for Interpolation
impl Sync for Interpolation
impl Unpin for Interpolation
impl UnwindSafe for Interpolation
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.