pub struct TagCache { /* private fields */ }
Expand description
Cache for PLC tags with automatic expiration
Implementations§
Source§impl TagCache
impl TagCache
Sourcepub fn new(expiration: Duration) -> Self
pub fn new(expiration: Duration) -> Self
Creates a new tag cache with the specified expiration time
Sourcepub fn update_tag(&mut self, name: String, metadata: TagMetadata)
pub fn update_tag(&mut self, name: String, metadata: TagMetadata)
Updates or adds a tag to the cache
Sourcepub fn get_tag(&self, name: &str) -> Option<&TagMetadata>
pub fn get_tag(&self, name: &str) -> Option<&TagMetadata>
Gets a tag from the cache if it exists and hasn’t expired
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TagCache
impl RefUnwindSafe for TagCache
impl Send for TagCache
impl Sync for TagCache
impl Unpin for TagCache
impl UnwindSafe for TagCache
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