pub struct Operation {
pub id: String,
pub original_id: String,
pub description: Option<String>,
pub protocol: Protocol,
pub endpoint: String,
pub http_method: HttpMethod,
pub params: Vec<Param>,
pub return_type: String,
pub streaming: StreamingMode,
}Expand description
An invocable API operation.
Fields§
§id: Stringsnake_case Rust method name.
original_id: StringOriginal operation id from the spec (used for CLI subcommand name).
description: Option<String>Doc comment / summary.
protocol: ProtocolProtocol used by this operation.
endpoint: StringFor HTTP-based operations: METHOD + path. For gRPC: full method
identifier (service/method).
http_method: HttpMethodHTTP method (only meaningful for OpenAPI/GraphQL).
params: Vec<Param>Inputs.
return_type: StringPre-rendered Rust return type, e.g. Pet or Vec<Pet> or ().
streaming: StreamingModeStreaming direction. Unary for plain request/response operations,
ServerStream for GraphQL subscriptions and gRPC stream responses,
ClientStream / BidiStream for gRPC stream-in / stream-both
signatures.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Operation
impl<'de> Deserialize<'de> for Operation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Operation
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnsafeUnpin for Operation
impl UnwindSafe for Operation
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