pub struct UnaryOp {
pub operator: UnaryOperator,
pub expr: Expression,
}
Expand description
An operation that applies an operator to one expression.
Fields§
§operator: UnaryOperator
The unary operator to use on the expression.
expr: Expression
An expression that supports evaluation with the unary operator.
Implementations§
source§impl UnaryOp
impl UnaryOp
sourcepub fn new<T>(operator: UnaryOperator, expr: T) -> UnaryOpwhere
T: Into<Expression>,
pub fn new<T>(operator: UnaryOperator, expr: T) -> UnaryOpwhere T: Into<Expression>,
Creates a new UnaryOp
from an operator and an expression.
Trait Implementations§
source§impl<'de> Deserialize<'de> for UnaryOp
impl<'de> Deserialize<'de> for UnaryOp
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 UnaryOp
impl Format for UnaryOp
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<UnaryOp> for Expression
impl From<UnaryOp> for Expression
source§impl<'de> IntoDeserializer<'de, Error> for UnaryOp
impl<'de> IntoDeserializer<'de, Error> for UnaryOp
§type Deserializer = MapAccessDeserializer<UnaryOpAccess>
type Deserializer = MapAccessDeserializer<UnaryOpAccess>
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<UnaryOp> for UnaryOp
impl PartialEq<UnaryOp> for UnaryOp
impl Eq for UnaryOp
impl StructuralEq for UnaryOp
impl StructuralPartialEq for UnaryOp
Auto Trait Implementations§
impl RefUnwindSafe for UnaryOp
impl Send for UnaryOp
impl Sync for UnaryOp
impl Unpin for UnaryOp
impl UnwindSafe for UnaryOp
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 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.