Skip to main content

OperatorFamilyItem

Enum OperatorFamilyItem 

Source
pub enum OperatorFamilyItem<'a> {
    Operator {
        operator_span: Span,
        number: (usize, Span),
        operator: QualifiedName<'a>,
        lparen_span: Span,
        left_type: DataType<'a>,
        comma_span: Span,
        right_type: DataType<'a>,
        rparen_span: Span,
        for_search: Option<Span>,
        for_order_by: Option<(Span, QualifiedName<'a>)>,
    },
    Function {
        function_span: Span,
        number: (usize, Span),
        lparen_span: Option<Span>,
        left_type: Option<DataType<'a>>,
        comma_span: Option<Span>,
        right_type: Option<DataType<'a>>,
        rparen_span: Option<Span>,
        function: QualifiedName<'a>,
        arg_lparen_span: Option<Span>,
        arg_types: Vec<DataType<'a>>,
        arg_rparen_span: Option<Span>,
    },
}
Expand description

Item to add to an operator family (OPERATOR or FUNCTION)

Variants§

§

Operator

OPERATOR entry

Fields

§operator_span: Span

Span of OPERATOR keyword

§number: (usize, Span)

Strategy number and its span

§operator: QualifiedName<'a>

Operator name

§lparen_span: Span

Span of left parenthesis

§left_type: DataType<'a>

Left operand type

§comma_span: Span

Span of comma

§right_type: DataType<'a>

Right operand type

§rparen_span: Span

Span of right parenthesis

§for_search: Option<Span>

Optional FOR SEARCH span

§for_order_by: Option<(Span, QualifiedName<'a>)>

Optional FOR ORDER BY (span, sort family)

§

Function

FUNCTION entry

Fields

§function_span: Span

Span of FUNCTION keyword

§number: (usize, Span)

Support number and its span

§lparen_span: Option<Span>

Span of left parenthesis, if present

§left_type: Option<DataType<'a>>

Left operand type, if present

§comma_span: Option<Span>

Span of comma, if present

§right_type: Option<DataType<'a>>

Right operand type, if present

§rparen_span: Option<Span>

Span of right parenthesis, if present

§function: QualifiedName<'a>

Function name

§arg_lparen_span: Option<Span>

Span of argument type list left parenthesis, if present

§arg_types: Vec<DataType<'a>>

Argument types for function

§arg_rparen_span: Option<Span>

Span of argument type list right parenthesis, if present

Trait Implementations§

Source§

impl<'a> Clone for OperatorFamilyItem<'a>

Source§

fn clone(&self) -> OperatorFamilyItem<'a>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for OperatorFamilyItem<'a>

Source§

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

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

impl<'a> Spanned for OperatorFamilyItem<'a>

Source§

fn span(&self) -> Span

Compute byte span of an ast fragment
Source§

fn join_span(&self, other: &impl OptSpanned) -> Span

Compute the minimal span containing both self and other

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> OptSpanned for T
where T: Spanned,

Source§

fn opt_span(&self) -> Option<Range<usize>>

Compute an optional byte span of an ast fragment
Source§

fn opt_join_span(&self, other: &impl OptSpanned) -> Option<Span>

Compute the minimal span containing both self and other if either is missing return the other
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.