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
sourceimpl 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
sourceimpl<'de> Deserialize<'de> for UnaryOp
impl<'de> Deserialize<'de> for UnaryOp
sourcefn 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
sourceimpl<'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.
sourcefn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<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,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.