pub struct PendingGeneration {
pub server_id: ServerId,
pub server_info: ServerInfo,
pub config: ServerConfig,
pub output_dir: PathBuf,
pub created_at: DateTime<Utc>,
pub expires_at: DateTime<Utc>,
}Expand description
Pending generation session.
Stores introspection data between introspect_server and
save_categorized_tools calls.
Fields§
§server_id: ServerIdServer identifier
server_info: ServerInfoFull server introspection data
config: ServerConfigServer configuration for regeneration if needed
output_dir: PathBufOutput directory
created_at: DateTime<Utc>Session creation time
expires_at: DateTime<Utc>Session expiration time (30 minutes default)
Implementations§
Source§impl PendingGeneration
impl PendingGeneration
Sourcepub const DEFAULT_TIMEOUT_MINUTES: i64 = 30i64
pub const DEFAULT_TIMEOUT_MINUTES: i64 = 30i64
Default session timeout: 30 minutes.
Sourcepub fn new(
server_id: ServerId,
server_info: ServerInfo,
config: ServerConfig,
output_dir: PathBuf,
) -> Self
pub fn new( server_id: ServerId, server_info: ServerInfo, config: ServerConfig, output_dir: PathBuf, ) -> Self
Creates a new pending generation session.
§Examples
use mcp_execution_server::types::PendingGeneration;
use mcp_execution_core::{ServerId, ServerConfig};
use mcp_execution_introspector::ServerInfo;
use std::path::PathBuf;
let server_id = ServerId::new("github");
let config = ServerConfig::builder()
.command("npx".to_string())
.arg("-y".to_string())
.arg("@anthropic/mcp-server-github".to_string())
.build();
let output_dir = PathBuf::from("/tmp/output");
let pending = PendingGeneration::new(
server_id,
server_info,
config,
output_dir,
);Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Checks if this session has expired.
§Examples
use mcp_execution_server::types::PendingGeneration;
let pending = PendingGeneration::new(
ServerId::new("test"),
server_info,
ServerConfig::builder().command("echo".to_string()).build(),
PathBuf::from("/tmp"),
);
assert!(!pending.is_expired());Trait Implementations§
Source§impl Clone for PendingGeneration
impl Clone for PendingGeneration
Source§fn clone(&self) -> PendingGeneration
fn clone(&self) -> PendingGeneration
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 moreAuto Trait Implementations§
impl Freeze for PendingGeneration
impl RefUnwindSafe for PendingGeneration
impl Send for PendingGeneration
impl Sync for PendingGeneration
impl Unpin for PendingGeneration
impl UnwindSafe for PendingGeneration
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