pub struct InMemoryTaskStore { /* private fields */ }Expand description
Process-local task attribution for an embedded server.
Implementations§
Source§impl InMemoryTaskStore
impl InMemoryTaskStore
Sourcepub fn with_capacity(max_tasks: usize) -> Self
pub fn with_capacity(max_tasks: usize) -> Self
Construct a task table retaining at most max_tasks associations.
When full, the oldest association is removed. Zero disables process-local task attribution.
Trait Implementations§
Source§impl Debug for InMemoryTaskStore
impl Debug for InMemoryTaskStore
Source§impl Default for InMemoryTaskStore
impl Default for InMemoryTaskStore
Source§impl TaskAttributionStore for InMemoryTaskStore
impl TaskAttributionStore for InMemoryTaskStore
Source§fn insert<'a>(
&'a self,
tenant_id: &'a str,
task_id: &'a str,
attribution: TaskAttribution,
) -> TaskStoreFuture<'a, ()>
fn insert<'a>( &'a self, tenant_id: &'a str, task_id: &'a str, attribution: TaskAttribution, ) -> TaskStoreFuture<'a, ()>
Associate a task with its resolved price and fixed origin category.
Source§fn get<'a>(
&'a self,
tenant_id: &'a str,
task_id: &'a str,
) -> TaskStoreFuture<'a, Option<TaskAttribution>>
fn get<'a>( &'a self, tenant_id: &'a str, task_id: &'a str, ) -> TaskStoreFuture<'a, Option<TaskAttribution>>
Resolve an association without consuming it.
Source§fn claim<'a>(
&'a self,
tenant_id: &'a str,
task_id: &'a str,
) -> TaskStoreFuture<'a, Option<TaskAttribution>>
fn claim<'a>( &'a self, tenant_id: &'a str, task_id: &'a str, ) -> TaskStoreFuture<'a, Option<TaskAttribution>>
Atomically consume and return an association. Read more
Auto Trait Implementations§
impl !Freeze for InMemoryTaskStore
impl RefUnwindSafe for InMemoryTaskStore
impl Send for InMemoryTaskStore
impl Sync for InMemoryTaskStore
impl Unpin for InMemoryTaskStore
impl UnsafeUnpin for InMemoryTaskStore
impl UnwindSafe for InMemoryTaskStore
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