pub struct AgentTaskDistributor {}Implementations§
Source§impl AgentTaskDistributor
impl AgentTaskDistributor
pub const fn new() -> AgentTaskDistributor
Trait Implementations§
Source§impl Default for AgentTaskDistributor
impl Default for AgentTaskDistributor
Source§fn default() -> AgentTaskDistributor
fn default() -> AgentTaskDistributor
Returns the “default value” for a type. Read more
Source§impl<'a> RoundRobinAgentTaskDistributor<'a> for AgentTaskDistributor
Note that we ran into problems with clippy here
See https://github.com/CronCats/cw-croncat/pull/415
impl<'a> RoundRobinAgentTaskDistributor<'a> for AgentTaskDistributor
Note that we ran into problems with clippy here See https://github.com/CronCats/cw-croncat/pull/415
Source§fn get_agent_tasks(
&self,
deps: &Deps<'_>,
_env: &Env,
agent_id: Addr,
slot_items: (Option<u64>, Option<u64>),
) -> Result<AgentTaskResponse, ContractError>
fn get_agent_tasks( &self, deps: &Deps<'_>, _env: &Env, agent_id: Addr, slot_items: (Option<u64>, Option<u64>), ) -> Result<AgentTaskResponse, ContractError>
.Gets agent tasks count for block/cron slots
# Errors
This function will return an error if agent does not exists
Source§fn on_task_completed(
&self,
storage: &'a mut dyn Storage,
_env: &Env,
agent_id: &Addr,
slot_type: SlotType,
) -> Result<(), ContractError>
fn on_task_completed( &self, storage: &'a mut dyn Storage, _env: &Env, agent_id: &Addr, slot_type: SlotType, ) -> Result<(), ContractError>
Updates agent stats when agent completed task on specified slot
Auto Trait Implementations§
impl Freeze for AgentTaskDistributor
impl RefUnwindSafe for AgentTaskDistributor
impl Send for AgentTaskDistributor
impl Sync for AgentTaskDistributor
impl Unpin for AgentTaskDistributor
impl UnwindSafe for AgentTaskDistributor
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