Skip to main content

UnaryOp

Struct UnaryOp 

Source
pub struct UnaryOp<V>
where V: Expression,
{ pub op: UnaryOpType, pub arg: V, }

Fields§

§op: UnaryOpType§arg: V

Trait Implementations§

Source§

impl<V> Debug for UnaryOp<V>
where V: Debug + Expression,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<E> Expression for UnaryOp<E>
where E: Expression,

Source§

fn write_query( &self, writer: &dyn SqlWriter, context: &mut Context, out: &mut DynQuery, )

Render the expression into SQL.
Source§

fn accept_visitor( &self, matcher: &mut dyn ExpressionVisitor, writer: &dyn SqlWriter, context: &mut Context, out: &mut DynQuery, ) -> bool

Match the expression.
Source§

fn as_identifier(&self, context: &mut Context) -> String

Convert expression to an identifier string.
Source§

impl<E> OpPrecedence for UnaryOp<E>
where E: Expression,

Source§

fn precedence(&self, writer: &dyn SqlWriter) -> i32

Lower numbers bind weaker, writers parenthesize when child precedence <= operator precedence.

Auto Trait Implementations§

§

impl<V> Freeze for UnaryOp<V>
where V: Freeze,

§

impl<V> RefUnwindSafe for UnaryOp<V>
where V: RefUnwindSafe,

§

impl<V> Send for UnaryOp<V>

§

impl<V> Sync for UnaryOp<V>

§

impl<V> Unpin for UnaryOp<V>
where V: Unpin,

§

impl<V> UnsafeUnpin for UnaryOp<V>
where V: UnsafeUnpin,

§

impl<V> UnwindSafe for UnaryOp<V>
where V: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.