Struct tidb_query_codegen::rpn_function::RpnFnAttr[][src]

struct RpnFnAttr {
    is_varg: bool,
    is_raw_varg: bool,
    nullable: bool,
    writer: bool,
    max_args: Option<usize>,
    min_args: Option<usize>,
    extra_validator: Option<TokenStream>,
    metadata_type: Option<TokenStream>,
    metadata_mapper: Option<TokenStream>,
    captures: Vec<Expr>,
}

Parses an attribute like #[rpn_fn(varg, capture = [ctx, output_rows]).

Fields

is_varg: bool

Whether or not the function is a varg function. Varg function accepts &[&Option<T>].

is_raw_varg: bool

Whether or not the function is a raw varg function. Raw varg function accepts &[ScalarValueRef].

nullable: bool

Whether or not the function needs extra logic on None value.

writer: bool

Whether or not to use writer / guard pattern.

max_args: Option<usize>

The maximum accepted arguments, which will be checked by the validator.

Only varg or raw_varg function accepts a range of number of arguments. Other kind of function strictly stipulates number of arguments according to the function definition.

min_args: Option<usize>

The minimal accepted arguments, which will be checked by the validator.

extra_validator: Option<TokenStream>

Extra validator.

metadata_type: Option<TokenStream>

Metadata type.

metadata_mapper: Option<TokenStream>

Metadata mapper.

captures: Vec<Expr>

Special variables captured when calling the function.

Trait Implementations

impl Debug for RpnFnAttr[src]

impl Default for RpnFnAttr[src]

impl Parse for RpnFnAttr[src]

Auto Trait Implementations

impl RefUnwindSafe for RpnFnAttr

impl !Send for RpnFnAttr

impl !Sync for RpnFnAttr

impl Unpin for RpnFnAttr

impl UnwindSafe for RpnFnAttr

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.