pub struct RuntimeInfo {
pub status: ServerStatus,
pub last_error: Option<String>,
pub connected_at: Option<DateTime<Utc>>,
pub disconnected_at: Option<DateTime<Utc>>,
pub tool_count: usize,
pub restart_count: u32,
pub last_ping_at: Option<DateTime<Utc>>,
}Expand description
Runtime information for an MCP server.
Contains comprehensive health and statistics data for a server connection, including status, timestamps, tool counts, and error information.
§Fields
status- Current operational status of the serverlast_error- Most recent error message (if any)connected_at- Timestamp when the server connecteddisconnected_at- Timestamp when the server disconnectedtool_count- Number of tools provided by this serverrestart_count- Number of times the server has been restartedlast_ping_at- Timestamp of the last successful ping
§Monitoring
This structure is used for health monitoring and diagnostics, providing visibility into server connection lifecycle and performance.
§Example
ⓘ
let info = RuntimeInfo {
status: ServerStatus::Ready,
connected_at: Some(Utc::now()),
tool_count: 5,
..Default::default()
};
if info.status == ServerStatus::Ready {
println!("Server has {} tools available", info.tool_count);
}Fields§
§status: ServerStatusCurrent operational status
last_error: Option<String>Most recent error message (if any)
connected_at: Option<DateTime<Utc>>Timestamp when the server connected
disconnected_at: Option<DateTime<Utc>>Timestamp when the server disconnected
tool_count: usizeNumber of tools provided by this server
restart_count: u32Number of times the server has been restarted
last_ping_at: Option<DateTime<Utc>>Timestamp of the last successful ping
Trait Implementations§
Source§impl Clone for RuntimeInfo
impl Clone for RuntimeInfo
Source§fn clone(&self) -> RuntimeInfo
fn clone(&self) -> RuntimeInfo
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 RuntimeInfo
impl Debug for RuntimeInfo
Source§impl Default for RuntimeInfo
impl Default for RuntimeInfo
Source§impl<'de> Deserialize<'de> for RuntimeInfo
impl<'de> Deserialize<'de> for RuntimeInfo
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
Auto Trait Implementations§
impl Freeze for RuntimeInfo
impl RefUnwindSafe for RuntimeInfo
impl Send for RuntimeInfo
impl Sync for RuntimeInfo
impl Unpin for RuntimeInfo
impl UnsafeUnpin for RuntimeInfo
impl UnwindSafe for RuntimeInfo
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