pub struct CacheEntry {
pub original_text: String,
pub translation: String,
pub created_at: SystemTime,
pub ttl: Duration,
pub access_count: u32,
pub last_accessed: SystemTime,
}Expand description
缓存条目
Fields§
§original_text: String原始文本
translation: String翻译结果
created_at: SystemTime创建时间
ttl: Duration生存时间
access_count: u32访问次数
last_accessed: SystemTime最后访问时间
Implementations§
Source§impl CacheEntry
impl CacheEntry
Trait Implementations§
Source§impl Clone for CacheEntry
impl Clone for CacheEntry
Source§fn clone(&self) -> CacheEntry
fn clone(&self) -> CacheEntry
Returns a copy 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 CacheEntry
impl RefUnwindSafe for CacheEntry
impl Send for CacheEntry
impl Sync for CacheEntry
impl Unpin for CacheEntry
impl UnwindSafe for CacheEntry
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