pub struct ServerBuilder { /* private fields */ }
Implementations§
Source§impl ServerBuilder
impl ServerBuilder
pub fn new() -> Self
pub fn with_name(self, name: impl Into<String>) -> Self
pub fn with_instructions(self, instructions: impl Into<String>) -> Self
pub fn with_version(self, version: impl Into<String>) -> Self
pub fn with_title(self, title: impl Into<String>) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
pub fn set_name(&mut self, name: impl Into<String>)
pub fn set_instructions(&mut self, instructions: impl Into<String>)
pub fn set_version(&mut self, version: impl Into<String>)
pub fn set_title(&mut self, title: impl Into<String>)
pub fn set_timeout(&mut self, timeout: Duration)
pub fn name(&self) -> &str
pub fn title(&self) -> &str
pub fn version(&self) -> &str
pub fn instructions(&self) -> &str
pub async fn start_stdio<T>(self) -> Result<(), McpSdkError>
pub async fn start_server<T>( self, host: impl Into<String>, port: u16, ) -> Result<(), McpSdkError>
Trait Implementations§
Source§impl Clone for ServerBuilder
impl Clone for ServerBuilder
Source§fn clone(&self) -> ServerBuilder
fn clone(&self) -> ServerBuilder
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 ServerBuilder
impl Debug for ServerBuilder
Source§impl Default for ServerBuilder
impl Default for ServerBuilder
Source§fn default() -> ServerBuilder
fn default() -> ServerBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ServerBuilder
impl RefUnwindSafe for ServerBuilder
impl Send for ServerBuilder
impl Sync for ServerBuilder
impl Unpin for ServerBuilder
impl UnwindSafe for ServerBuilder
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