pub struct TaskService<B: Bmc> { /* private fields */ }Expand description
Task service.
Provides task links for task locations returned by asynchronous operations.
§Example
ⓘ
let Some(task_service) = root.task_service().await? else {
return Ok(());
};
let task_link = task_service.task_link(async_task)?;
let task = task_link.fetch().await?;
println!("{:?}", task.task_state);Implementations§
Source§impl<B: Bmc> TaskService<B>
impl<B: Bmc> TaskService<B>
Sourcepub fn raw(&self) -> Arc<TaskServiceSchema> ⓘ
pub fn raw(&self) -> Arc<TaskServiceSchema> ⓘ
Get the raw schema data for this task service.
Sourcepub fn task_link(&self, task: AsyncTask) -> Result<TaskLink<B>, Error<B>>
pub fn task_link(&self, task: AsyncTask) -> Result<TaskLink<B>, Error<B>>
Create a task link from an asynchronous operation result.
The task location must be a child of this service’s Tasks collection,
such as /redfish/v1/TaskService/Tasks/{id}. The returned link does not
fetch the task until TaskLink::fetch is called.
§Errors
Returns error if the task location is not a child of this service’s Tasks collection.
Trait Implementations§
Source§impl<B: Bmc> Resource for TaskService<B>
impl<B: Bmc> Resource for TaskService<B>
Source§fn resource_ref(&self) -> &ResourceSchema
fn resource_ref(&self) -> &ResourceSchema
Required function. Must be implemented for Redfish resources.
Source§fn id(&self) -> ResourceIdRef<'_>
fn id(&self) -> ResourceIdRef<'_>
Identifier of the resource.
Source§fn name(&self) -> ResourceNameRef<'_>
fn name(&self) -> ResourceNameRef<'_>
Name of the resource.
Source§fn description(&self) -> Option<ResourceDescriptionRef<'_>>
fn description(&self) -> Option<ResourceDescriptionRef<'_>>
Description of the resource.
Auto Trait Implementations§
impl<B> Freeze for TaskService<B>
impl<B> RefUnwindSafe for TaskService<B>where
B: RefUnwindSafe,
impl<B> Send for TaskService<B>
impl<B> Sync for TaskService<B>
impl<B> Unpin for TaskService<B>
impl<B> UnsafeUnpin for TaskService<B>
impl<B> UnwindSafe for TaskService<B>where
B: RefUnwindSafe,
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