Struct validator_types::CustomArgument[][src]

pub struct CustomArgument {
    pub def_span: Span,
    pub arg_type: Type,
    pub arg_access: Option<Expr>,
}
Expand description

This struct stores information about defined custom arguments that will be passed in by the user in the validation step.

Fields

def_span: Span

The span of type definition, this can be used in combination with quote_spanned! for better error reporting

arg_type: Type

The type of the argument. This can use 'v_a as a lifetime but has to be Sized. This means that the type size has to be known at compile time

arg_access: Option<Expr>

This is the way we can access the value from the provided arguments. This will usually look something like args.0.

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.