Skip to main content

Call

Type Alias Call 

Source
pub type Call<'a> = WireRequest<'a>;
Expand description

The name this type has carried since it described only cassette calls.

Kept as an alias rather than a second struct: the sealed surface and the discovered surface describe a call identically, and the two names existing at all was a side effect of the two surfaces having lived in two crates.

Aliased Type§

pub struct Call<'a> {
    pub method: &'a str,
    pub path: &'a str,
    pub path_params: Vec<(String, String)>,
    pub query: Vec<(String, String)>,
    pub headers: Vec<(String, String)>,
    pub body: Option<String>,
}

Fields§

§method: &'a str

The HTTP verb, uppercased.

§path: &'a str

The public path template, {name} placeholders included.

§path_params: Vec<(String, String)>

Values for those placeholders, by placeholder name.

§query: Vec<(String, String)>

Query parameters, under their wire names.

§headers: Vec<(String, String)>

Header parameters, under their wire names.

§body: Option<String>

A JSON request body, when the operation takes one.