pub struct CacheConfig {
pub max_age: u32,
}Expand description
Configuration for Cache-Control headers on agent card responses.
Fields§
§max_age: u32max-age value in seconds.
Implementations§
Source§impl CacheConfig
impl CacheConfig
Sourcepub const fn with_max_age(max_age: u32) -> Self
pub const fn with_max_age(max_age: u32) -> Self
Creates a config with the given max-age.
Sourcepub fn header_value(&self) -> String
pub fn header_value(&self) -> String
Returns the Cache-Control header value.
Trait Implementations§
Source§impl Clone for CacheConfig
impl Clone for CacheConfig
Source§fn clone(&self) -> CacheConfig
fn clone(&self) -> CacheConfig
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 CacheConfig
impl Debug for CacheConfig
Source§impl Default for CacheConfig
impl Default for CacheConfig
impl Copy for CacheConfig
Auto Trait Implementations§
impl Freeze for CacheConfig
impl RefUnwindSafe for CacheConfig
impl Send for CacheConfig
impl Sync for CacheConfig
impl Unpin for CacheConfig
impl UnsafeUnpin for CacheConfig
impl UnwindSafe for CacheConfig
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