Struct hcl::expr::RawExpression
source · pub struct RawExpression(/* private fields */);
👎Deprecated since 0.16.3: Support for raw expressions will be removed in an upcoming release
Expand description
A type that holds the value of a raw expression. It can be used to serialize arbitrary HCL expressions.
Please note: raw expressions are not validated during serialization, so it is your responsiblity to ensure that they are valid HCL.
Implementations§
source§impl RawExpression
impl RawExpression
sourcepub fn new<E>(expr: E) -> RawExpression
pub fn new<E>(expr: E) -> RawExpression
Creates a new RawExpression
from something that can be converted to a String
.
sourcepub fn into_inner(self) -> String
pub fn into_inner(self) -> String
Consumes self
and returns the RawExpression
as a String
. If you want to represent the
RawExpression
as an interpolated string, use .to_string()
instead.
Trait Implementations§
source§impl Clone for RawExpression
impl Clone for RawExpression
source§fn clone(&self) -> RawExpression
fn clone(&self) -> RawExpression
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 RawExpression
impl Debug for RawExpression
source§impl<'de> Deserialize<'de> for RawExpression
impl<'de> Deserialize<'de> for RawExpression
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 Display for RawExpression
impl Display for RawExpression
source§impl Format for RawExpression
impl Format for RawExpression
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<&str> for RawExpression
impl From<&str> for RawExpression
source§impl From<RawExpression> for Expression
impl From<RawExpression> for Expression
source§fn from(raw: RawExpression) -> Self
fn from(raw: RawExpression) -> Self
Converts to this type from the input type.
source§impl From<RawExpression> for String
impl From<RawExpression> for String
source§fn from(expr: RawExpression) -> Self
fn from(expr: RawExpression) -> Self
Converts to this type from the input type.
source§impl From<String> for RawExpression
impl From<String> for RawExpression
source§impl Hash for RawExpression
impl Hash for RawExpression
source§impl<'de> IntoDeserializer<'de, Error> for RawExpression
impl<'de> IntoDeserializer<'de, Error> for RawExpression
§type Deserializer = StringDeserializer<Error>
type Deserializer = StringDeserializer<Error>
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 for RawExpression
impl PartialEq for RawExpression
source§fn eq(&self, other: &RawExpression) -> bool
fn eq(&self, other: &RawExpression) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for RawExpression
impl Serialize for RawExpression
impl Eq for RawExpression
impl StructuralPartialEq for RawExpression
Auto Trait Implementations§
impl Freeze for RawExpression
impl RefUnwindSafe for RawExpression
impl Send for RawExpression
impl Sync for RawExpression
impl Unpin for RawExpression
impl UnwindSafe for RawExpression
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<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.