Struct tidb_query_codegen::rpn_function::RpnFnAttr [−][src]
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
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][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,