pub struct ApiContext {Show 17 fields
pub function_name: String,
pub operation_id: Option<String>,
pub http_method: String,
pub path: String,
pub path_params: Vec<Parameter>,
pub query_params: Vec<Parameter>,
pub request_body: Option<RequestBody>,
pub responses: Vec<Response>,
pub type_imports: String,
pub http_import: String,
pub return_type: String,
pub function_body: String,
pub response_types: String,
pub module_name: String,
pub params: String,
pub description: String,
pub spec_name: Option<String>,
}Expand description
Context for API client function generation.
Fields§
§function_name: String§operation_id: Option<String>§http_method: String§path: String§path_params: Vec<Parameter>§query_params: Vec<Parameter>§request_body: Option<RequestBody>§responses: Vec<Response>§type_imports: String§http_import: String§return_type: String§function_body: String§response_types: String§module_name: String§params: String§description: String§spec_name: Option<String>Spec name (for multi-spec mode)
Implementations§
Source§impl ApiContext
impl ApiContext
Sourcepub fn new(
function_name: String,
operation_id: Option<String>,
http_method: String,
path: String,
path_params: Vec<Parameter>,
query_params: Vec<Parameter>,
request_body: Option<RequestBody>,
responses: Vec<Response>,
type_imports: String,
http_import: String,
return_type: String,
function_body: String,
response_types: String,
module_name: String,
params: String,
description: String,
spec_name: Option<String>,
) -> Self
pub fn new( function_name: String, operation_id: Option<String>, http_method: String, path: String, path_params: Vec<Parameter>, query_params: Vec<Parameter>, request_body: Option<RequestBody>, responses: Vec<Response>, type_imports: String, http_import: String, return_type: String, function_body: String, response_types: String, module_name: String, params: String, description: String, spec_name: Option<String>, ) -> Self
Create a new ApiContext.
Trait Implementations§
Source§impl Clone for ApiContext
impl Clone for ApiContext
Source§fn clone(&self) -> ApiContext
fn clone(&self) -> ApiContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ApiContext
impl Debug for ApiContext
Auto Trait Implementations§
impl Freeze for ApiContext
impl RefUnwindSafe for ApiContext
impl Send for ApiContext
impl Sync for ApiContext
impl Unpin for ApiContext
impl UnwindSafe for ApiContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more