pub struct TaskConfig {
pub task_id: String,
pub think_more_config: ThinkMoreConfig,
pub context: HashMap<String, Value>,
}Expand description
Configuration for a specific task
Fields§
§task_id: StringTask identifier
think_more_config: ThinkMoreConfigThink More configuration for this task
context: HashMap<String, Value>Custom context data for this task
Implementations§
Source§impl TaskConfig
impl TaskConfig
Sourcepub fn new(task_id: String, think_more_config: ThinkMoreConfig) -> Self
pub fn new(task_id: String, think_more_config: ThinkMoreConfig) -> Self
Create a new task configuration
Sourcepub fn add_context(&mut self, key: String, value: Value)
pub fn add_context(&mut self, key: String, value: Value)
Add context data to the task
Sourcepub fn get_context(&self, key: &str) -> Option<&Value>
pub fn get_context(&self, key: &str) -> Option<&Value>
Get context data from the task
Sourcepub fn remove_context(&mut self, key: &str) -> Option<Value>
pub fn remove_context(&mut self, key: &str) -> Option<Value>
Remove context data from the task
Sourcepub fn clear_context(&mut self)
pub fn clear_context(&mut self)
Clear all context data
Trait Implementations§
Source§impl Clone for TaskConfig
impl Clone for TaskConfig
Source§fn clone(&self) -> TaskConfig
fn clone(&self) -> TaskConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TaskConfig
impl RefUnwindSafe for TaskConfig
impl Send for TaskConfig
impl Sync for TaskConfig
impl Unpin for TaskConfig
impl UnwindSafe for TaskConfig
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