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.