pub struct ServiceRegistrationRequest {
pub name: String,
pub version: String,
pub description: Option<String>,
pub tools: Vec<ToolDefinition>,
pub nodes: Vec<NodeDefinition>,
pub transport_type: String,
pub command: Option<String>,
pub args: Vec<String>,
}Expand description
Service registration request
Fields§
§name: StringService name
version: StringService version
description: Option<String>Service description
tools: Vec<ToolDefinition>Tools to register
nodes: Vec<NodeDefinition>Nodes to register
transport_type: StringTransport type (stdio or tcp)
command: Option<String>Command (for stdio)
args: Vec<String>Arguments (for stdio)
Implementations§
Source§impl ServiceRegistrationRequest
impl ServiceRegistrationRequest
Sourcepub fn new(name: impl Into<String>, version: impl Into<String>) -> Self
pub fn new(name: impl Into<String>, version: impl Into<String>) -> Self
Create a new registration request
Sourcepub fn description(self, desc: impl Into<String>) -> Self
pub fn description(self, desc: impl Into<String>) -> Self
Add description
Sourcepub fn tool(self, tool: ToolDefinition) -> Self
pub fn tool(self, tool: ToolDefinition) -> Self
Add a tool
Sourcepub fn node(self, node: NodeDefinition) -> Self
pub fn node(self, node: NodeDefinition) -> Self
Add a node
Trait Implementations§
Source§impl Clone for ServiceRegistrationRequest
impl Clone for ServiceRegistrationRequest
Source§fn clone(&self) -> ServiceRegistrationRequest
fn clone(&self) -> ServiceRegistrationRequest
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 moreAuto Trait Implementations§
impl Freeze for ServiceRegistrationRequest
impl RefUnwindSafe for ServiceRegistrationRequest
impl Send for ServiceRegistrationRequest
impl Sync for ServiceRegistrationRequest
impl Unpin for ServiceRegistrationRequest
impl UnsafeUnpin for ServiceRegistrationRequest
impl UnwindSafe for ServiceRegistrationRequest
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