pub struct NestedEndpointParams<'a, T> {
    pub root: &'a str,
    pub parent: &'a str,
    pub child: &'a str,
    pub parent_query: &'a str,
    pub row_source: T,
    pub base_uri: Option<&'a str>,
}
Expand description

The construction parameters for NestedEndpoint

Fields

root: &'a str

The base mock path, without trailing slash, for example "/api/v0.2"

parent: &'a str

The objects this endpoint is nested under, for example "bars".

child: &'a str

The objects this endpoint serves, for example "foos"

parent_query: &'a str

The filter path for the parent from the child, so for example "parent" if the filter expression for a given Foo to obtain its containing Bar is "parent".

row_source: T

The actual data to serve, as for Endpoint

base_uri: Option<&'a str>

The mock server URI, since wiremock does not make this available to us; specifying None here will break pagination (if requested) until wiremock propagates this information.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more