pub trait Properties:
Send
+ Sync
+ 'static
+ Clone
+ Default
+ Debug {
// Required methods
fn with_phantom(self, phantom: bool) -> Self;
fn phantom(&self) -> Option<bool>;
fn with_hint(self, hint: Hint) -> Self;
fn hint(&self) -> Option<Hint>;
fn with_location(self, location: Location) -> Self;
fn location(&self) -> Option<Location>;
fn with_age(self, age: Age) -> Self;
fn age(&self) -> Option<Age>;
}Expand description
Entry level properties trait.
The in-memory only cache and the hybrid cache may have different properties implementations to minimize the overhead of necessary properties in different scenarios.
Required Methods§
Sourcefn with_phantom(self, phantom: bool) -> Self
fn with_phantom(self, phantom: bool) -> Self
Set entry as a phantom entry.
A phantom entry will not be actually inserted into the in-memory cache. It is only used to keep the APIs consistent.
NOTE: This API is for internal usage only. It MUST NOT be exported publicly.
Sourcefn with_location(self, location: Location) -> Self
fn with_location(self, location: Location) -> Self
Set entry location.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.