Struct ngtask_queue_basic::TaskQueue
source · pub struct TaskQueue {
pub is_initialised: bool,
pub id_queue: HashMap<String, String>,
pub category_queues: HashMap<String, Vec<String>>,
}Fields§
§is_initialised: bool§id_queue: HashMap<String, String>§category_queues: HashMap<String, Vec<String>>Trait Implementations§
source§impl NGTQ for TaskQueue
impl NGTQ for TaskQueue
source§fn initialise() -> Arc<Mutex<TaskQueue>>
fn initialise() -> Arc<Mutex<TaskQueue>>
Returns an instance of your TaskQueue wrapped in Arc<Mutex<>>
source§fn get_id_queue_len(&self) -> Result<usize, NGTQError>
fn get_id_queue_len(&self) -> Result<usize, NGTQError>
Returns the current number of tasks in the ID queue Read more
source§fn get_category_queue_len(&self, category: &str) -> Result<usize, NGTQError>
fn get_category_queue_len(&self, category: &str) -> Result<usize, NGTQError>
Returns the current number of tasks in a specific category queue Read more
source§fn push_id_task_to_queue(
&mut self,
payload: String,
) -> Result<String, NGTQError>
fn push_id_task_to_queue( &mut self, payload: String, ) -> Result<String, NGTQError>
Push a new task to the id queue - Return queue size after adding the new task Read more
source§fn push_category_task_to_queue(
&mut self,
category: String,
payload: String,
) -> Result<(), NGTQError>
fn push_category_task_to_queue( &mut self, category: String, payload: String, ) -> Result<(), NGTQError>
Push a new task to the category queue Read more
Auto Trait Implementations§
impl Freeze for TaskQueue
impl RefUnwindSafe for TaskQueue
impl Send for TaskQueue
impl Sync for TaskQueue
impl Unpin for TaskQueue
impl UnwindSafe for TaskQueue
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