pub struct TaskRequest { /* private fields */ }Expand description
A request for an agent to perform a task.
TaskRequest encapsulates all the information needed for an agent to
process a user request, including optional metadata like name, description,
and priority.
§Examples
use ceylon::tasks::TaskRequest;
// Simple task
let task = TaskRequest::new("What is 2 + 2?");
// Task with metadata
let mut task = TaskRequest::new("Analyze this data");
task.with_name("Data Analysis")
.with_description("Perform statistical analysis on user data")
.with_priority(8);Implementations§
Source§impl TaskRequest
impl TaskRequest
Sourcepub fn with_description(&mut self, description: &str) -> &mut Self
pub fn with_description(&mut self, description: &str) -> &mut Self
Sets the description of the task.
§Arguments
description- A detailed description of what the task should accomplish
Sourcepub fn with_priority(&mut self, priority: u64) -> &mut Self
pub fn with_priority(&mut self, priority: u64) -> &mut Self
Sets the priority of the task (1-10, where 10 is highest).
§Arguments
priority- Task priority level
Auto Trait Implementations§
impl Freeze for TaskRequest
impl RefUnwindSafe for TaskRequest
impl Send for TaskRequest
impl Sync for TaskRequest
impl Unpin for TaskRequest
impl UnwindSafe for TaskRequest
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more