pub struct EndpointBuilder { /* private fields */ }
Expand description

Builder for Endpoint.

Implementations§

Absolute route as format template Variables are written in curly braces {}.

Examples:

/root/{id}/sub/{arg}

Expected status if query is ok

returns a list of results

returns a stream of bytes for this endpoint This flag generates the --output arguments. This flag disables the --format arguments.

clap route separated by slash (/)

Variables should match the variables declared in the route configuration.

/command/{id}/subcommand/{arg}

Short help string for this endpoint

Long help string for this endpoint.

This empty have no output to display. It can be combined with the EmptyResponse result structure.

Examples:

endpoint(
  result_ok_status = "NO_CONTENT",
  cli_no_output,
  result_struct = "EmptyResponse",
  route = "...",
  cli_route = "...",
),

Force the generation of ‘–format’ args in variable sub command. There’s cases where the arg is not generated automatically.

Example:

/route/{var}'

By default, {var} don’t generate --format. If route is just a passthrough, you need the cli_force_output_format to generate the --format args.

Builds a new Endpoint.

Errors

If a required field has not been initialized.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns the “default value” for a type. 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

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.