pub struct ConditionalCache { /* private fields */ }Expand description
Validators and bodies of the listings one client polls.
Implementations§
Source§impl ConditionalCache
impl ConditionalCache
pub fn new(clock: Arc<dyn Clock>) -> Self
pub fn is_empty(&self) -> bool
Sourcepub async fn send(
&self,
client: &AuthenticatedClient,
request: &ApiRequest,
) -> Result<Fetched, GithubError>
pub async fn send( &self, client: &AuthenticatedClient, request: &ApiRequest, ) -> Result<Fetched, GithubError>
request, sent conditionally when a previous answer to it is cached.
§Errors
Whatever AuthenticatedClient::send fails with.
Sourcepub fn evict_idle(&self)
pub fn evict_idle(&self)
Drop every entry unused for IDLE_ENTRY_TTL.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ConditionalCache
impl !RefUnwindSafe for ConditionalCache
impl !UnwindSafe for ConditionalCache
impl Send for ConditionalCache
impl Sync for ConditionalCache
impl Unpin for ConditionalCache
impl UnsafeUnpin for ConditionalCache
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