pub struct OperationDescriptor {
pub contract: OperationContract,
pub http: HttpBinding,
}Expand description
A protocol-neutral operation paired with its HTTP projection.
Fields§
§contract: OperationContract§http: HttpBindingImplementations§
Source§impl OperationDescriptor
impl OperationDescriptor
Sourcepub fn new(
method: HttpMethod,
path: impl Into<String>,
id: impl Into<String>,
summary: impl Into<String>,
input: Option<TypeDescriptor>,
responses: Vec<ResponseDescriptor>,
) -> Result<Self, InvalidOperationId>
pub fn new( method: HttpMethod, path: impl Into<String>, id: impl Into<String>, summary: impl Into<String>, input: Option<TypeDescriptor>, responses: Vec<ResponseDescriptor>, ) -> Result<Self, InvalidOperationId>
Creates an HTTP projection of a protocol-neutral operation.
§Errors
Returns InvalidOperationId when id is not a valid stable
operation identity.
pub fn with_mcp_tool(self, tool: McpToolDescriptor, policy: AgentPolicy) -> Self
pub fn mcp_tool(&self) -> Option<&McpToolDescriptor>
pub fn with_inputs(self, inputs: Vec<InputDescriptor>) -> Self
pub fn with_dependencies(self, dependencies: Vec<DependencyDescriptor>) -> Self
pub fn with_security(self, requirements: Vec<SecurityRequirement>) -> Self
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
Source§impl<'de> Deserialize<'de> for OperationDescriptor
impl<'de> Deserialize<'de> for OperationDescriptor
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
impl Eq for OperationDescriptor
Source§impl PartialEq for OperationDescriptor
impl PartialEq for OperationDescriptor
Source§impl Serialize for OperationDescriptor
impl Serialize for OperationDescriptor
impl StructuralPartialEq 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> BackgroundExt for T
impl<T> BackgroundExt for T
fn background(self, task: BackgroundTask) -> Background<Self>
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