pub struct ToolCacheConfig {
pub max_entries: usize,
pub default_ttl_secs: u64,
pub max_ttl_secs: u64,
}Expand description
Runtime configuration for the shared tool cache, controlling capacity and expiration behavior. 共享工具缓存的运行时配置,控制容量与过期策略。
Fields§
§max_entries: usizeMaximum number of entries; oldest entries are evicted when the cache exceeds this size. 缓存最大条目数,超出后会按创建顺序淘汰最旧条目。
default_ttl_secs: u64Default TTL in seconds used when callers omit a TTL. 默认 TTL(秒),调用方未传 TTL 时使用。
max_ttl_secs: u64Maximum TTL in seconds; requested TTL values are clamped to this ceiling. 最大 TTL(秒),请求 TTL 会被限制在该范围内。
Trait Implementations§
Source§impl Clone for ToolCacheConfig
impl Clone for ToolCacheConfig
Source§fn clone(&self) -> ToolCacheConfig
fn clone(&self) -> ToolCacheConfig
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 ToolCacheConfig
impl Debug for ToolCacheConfig
Source§impl Default for ToolCacheConfig
impl Default for ToolCacheConfig
Source§impl<'de> Deserialize<'de> for ToolCacheConfig
impl<'de> Deserialize<'de> for ToolCacheConfig
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 ToolCacheConfig
impl RefUnwindSafe for ToolCacheConfig
impl Send for ToolCacheConfig
impl Sync for ToolCacheConfig
impl Unpin for ToolCacheConfig
impl UnsafeUnpin for ToolCacheConfig
impl UnwindSafe for ToolCacheConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request