pub struct ActixServer { /* private fields */ }Expand description
Turnkey Actix MCP server.
Created via create_actix_server() and started
with .start() or .start_runtime().
Implementations§
Source§impl ActixServer
impl ActixServer
Sourcepub fn new(
server_details: InitializeResult,
handler: Arc<dyn McpServerHandler + 'static>,
server_options: ActixServerOptions,
) -> Self
pub fn new( server_details: InitializeResult, handler: Arc<dyn McpServerHandler + 'static>, server_options: ActixServerOptions, ) -> Self
Creates a new ActixServer instance.
Sourcepub fn state(&self) -> Arc<McpAppState> ⓘ
pub fn state(&self) -> Arc<McpAppState> ⓘ
Returns a shared reference to the application state.
Sourcepub fn options(&self) -> &ActixServerOptions
pub fn options(&self) -> &ActixServerOptions
Returns the server configuration.
Sourcepub fn server_info(&self, addr: Option<SocketAddr>) -> Result<String, String>
pub fn server_info(&self, addr: Option<SocketAddr>) -> Result<String, String>
Generates the server info string for startup logging.
Sourcepub async fn start_runtime(self) -> SdkResult<ActixRuntime>
pub async fn start_runtime(self) -> SdkResult<ActixRuntime>
Starts the server and returns a runtime handle.
Auto Trait Implementations§
impl !RefUnwindSafe for ActixServer
impl !UnwindSafe for ActixServer
impl Freeze for ActixServer
impl Send for ActixServer
impl Sync for ActixServer
impl Unpin for ActixServer
impl UnsafeUnpin for ActixServer
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