pub struct OperationDescriptor {Show 13 fields
pub operation_id: &'static str,
pub handler: &'static str,
pub surface: Surface,
pub method: HttpMethod,
pub path: &'static str,
pub path_params: &'static [&'static str],
pub catch_all: &'static [&'static str],
pub query: &'static [&'static str],
pub headers: &'static [&'static str],
pub body: Option<BodySpec>,
pub response: ResponseKind,
pub success_statuses: &'static [u16],
pub security: &'static [&'static [&'static str]],
}Expand description
What the generator knows about one operation. The transport reads nothing else about the contract.
Fields§
§operation_id: &'static str§handler: &'static str§surface: Surface§method: HttpMethod§path: &'static strPath template; {name} marks a path parameter.
path_params: &'static [&'static str]§catch_all: &'static [&'static str]Path parameters that may contain / (the route captures the rest of the path).
query: &'static [&'static str]§headers: &'static [&'static str]§body: Option<BodySpec>§response: ResponseKind§success_statuses: &'static [u16]§security: &'static [&'static [&'static str]]Alternatives in the contract’s order; an empty alternative means the call may be anonymous.
Trait Implementations§
Source§impl Clone for OperationDescriptor
impl Clone for OperationDescriptor
Source§fn clone(&self) -> OperationDescriptor
fn clone(&self) -> OperationDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 OperationDescriptor
impl Debug for OperationDescriptor
impl Copy for OperationDescriptor
Auto Trait Implementations§
impl Freeze for OperationDescriptor
impl RefUnwindSafe for OperationDescriptor
impl Send for OperationDescriptor
impl Sync for OperationDescriptor
impl Unpin for OperationDescriptor
impl UnsafeUnpin for OperationDescriptor
impl UnwindSafe for OperationDescriptor
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