pub struct RunningServer { /* private fields */ }Expand description
A running embedded server: the child process handle plus a connected
rmcp client. Derefs to the client, so rmcp peer methods
(list_all_tools, call_tool, …) are available directly.
Implementations§
Source§impl RunningServer
impl RunningServer
Sourcepub fn client(&self) -> &RunningService<RoleClient, ()>
pub fn client(&self) -> &RunningService<RoleClient, ()>
The connected rmcp client.
Sourcepub fn binary_path(&self) -> &Path
pub fn binary_path(&self) -> &Path
Path of the stackql binary that was launched.
Methods from Deref<Target = RunningService<RoleClient, ()>>§
Methods from Deref<Target = Peer<R>>§
pub async fn send_notification( &self, notification: <R as ServiceRole>::Not, ) -> Result<(), ServiceError>
pub async fn send_request( &self, request: <R as ServiceRole>::Req, ) -> Result<<R as ServiceRole>::PeerResp, ServiceError>
pub async fn send_cancellable_request( &self, request: <R as ServiceRole>::Req, options: PeerRequestOptions, ) -> Result<RequestHandle<R>, ServiceError>
pub async fn send_request_with_option( &self, request: <R as ServiceRole>::Req, options: PeerRequestOptions, ) -> Result<RequestHandle<R>, ServiceError>
pub fn peer_info(&self) -> Option<&<R as ServiceRole>::PeerInfo>
pub fn set_peer_info(&self, info: <R as ServiceRole>::PeerInfo)
pub fn is_transport_closed(&self) -> bool
Trait Implementations§
Source§impl Deref for RunningServer
impl Deref for RunningServer
Source§type Target = RunningService<RoleClient, ()>
type Target = RunningService<RoleClient, ()>
The resulting type after dereferencing.
Auto Trait Implementations§
impl !RefUnwindSafe for RunningServer
impl !UnwindSafe for RunningServer
impl Freeze for RunningServer
impl Send for RunningServer
impl Sync for RunningServer
impl Unpin for RunningServer
impl UnsafeUnpin for RunningServer
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