pub struct FieldCache { /* private fields */ }Expand description
In-memory cache for Jira field metadata, keyed by “project:issue_type_id”.
Safe to share across tokio tasks: interior mutability via Mutex. The lock
is never held across an .await.
Implementations§
Source§impl FieldCache
impl FieldCache
pub fn new() -> Self
Sourcepub async fn get_or_fetch(
&self,
client: &JiraClient,
project_key: &str,
issue_type_id: &str,
) -> Result<Vec<Field>>
pub async fn get_or_fetch( &self, client: &JiraClient, project_key: &str, issue_type_id: &str, ) -> Result<Vec<Field>>
Return cached fields or fetch from the API if stale / missing.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for FieldCache
impl RefUnwindSafe for FieldCache
impl Send for FieldCache
impl Sync for FieldCache
impl Unpin for FieldCache
impl UnsafeUnpin for FieldCache
impl UnwindSafe for FieldCache
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