pub struct CacheConfig {
pub max_entries: usize,
pub max_key_length: usize,
pub track_stats: bool,
}Expand description
캐시 설정
Fields§
§max_entries: usize최대 캐시 항목 수
max_key_length: usize최대 키 길이 (바이트)
track_stats: bool통계 추적 활성화
Implementations§
Source§impl CacheConfig
impl CacheConfig
Sourcepub const fn new() -> CacheConfig
pub const fn new() -> CacheConfig
새 설정 생성
Sourcepub const fn with_max_entries(self, max: usize) -> CacheConfig
pub const fn with_max_entries(self, max: usize) -> CacheConfig
최대 항목 수 설정
Sourcepub const fn with_max_key_length(self, max: usize) -> CacheConfig
pub const fn with_max_key_length(self, max: usize) -> CacheConfig
최대 키 길이 설정
Sourcepub const fn with_track_stats(self, track: bool) -> CacheConfig
pub const fn with_track_stats(self, track: bool) -> CacheConfig
통계 추적 설정
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
Source§fn default() -> CacheConfig
fn default() -> CacheConfig
Returns the “default value” for a type. Read more
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more