pub struct RegentTaskResult { /* private fields */ }Expand description
Result of executing a RegentTask.
Contains the task-level idempotency key for deduplication purposes, along with the host’s compliance status. This key allows external systems to identify duplicate task deliveries, which is separate from attribute-level idempotency.
§Example
use regent_sdk::task::RegentTaskResult;
use regent_sdk::state::compliance::ManagedHostStatus;
let result = RegentTaskResult::from(
"abc123".to_string(),
ManagedHostStatus::already_compliant(),
);
assert_eq!(result.idempotency_key(), "abc123");
assert!(result.host_status().is_already_compliant());Implementations§
Source§impl RegentTaskResult
impl RegentTaskResult
Sourcepub fn from(idempotency_key: String, host_status: ManagedHostStatus) -> Self
pub fn from(idempotency_key: String, host_status: ManagedHostStatus) -> Self
Create a new task result.
§Arguments
idempotency_key- The task-level idempotency key for deduplication of task deliverieshost_status- The host’s compliance status
§Returns
A new RegentTaskResult instance.
§Example
use regent_sdk::task::RegentTaskResult;
use regent_sdk::state::compliance::ManagedHostStatus;
let result = RegentTaskResult::from(
"task-123".to_string(),
ManagedHostStatus::already_compliant(),
);Trait Implementations§
Source§impl Debug for RegentTaskResult
impl Debug for RegentTaskResult
Source§impl<'de> Deserialize<'de> for RegentTaskResult
impl<'de> Deserialize<'de> for RegentTaskResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RegentTaskResult
impl RefUnwindSafe for RegentTaskResult
impl Send for RegentTaskResult
impl Sync for RegentTaskResult
impl Unpin for RegentTaskResult
impl UnsafeUnpin for RegentTaskResult
impl UnwindSafe for RegentTaskResult
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