pub struct CacheKey {
pub path: Option<PathBuf>,
pub content_hash: u64,
}Expand description
Cache key for templates, combining path and content hash.
Fields§
§path: Option<PathBuf>File path (if loaded from file)
content_hash: u64Hash of template content
Implementations§
Source§impl CacheKey
impl CacheKey
Sourcepub fn from_template(template: &TronTemplate) -> Self
pub fn from_template(template: &TronTemplate) -> Self
Create a new cache key from a template.
Sourcepub fn from_content(content: &str, path: Option<&Path>) -> Self
pub fn from_content(content: &str, path: Option<&Path>) -> Self
Create a cache key from content and optional path.
Trait Implementations§
impl Eq for CacheKey
impl StructuralPartialEq for CacheKey
Auto Trait Implementations§
impl Freeze for CacheKey
impl RefUnwindSafe for CacheKey
impl Send for CacheKey
impl Sync for CacheKey
impl Unpin for CacheKey
impl UnwindSafe for CacheKey
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