pub struct HostResourceStatus<S = HostResourceOutcome> {
pub resource_key: ResourceKey,
pub scope: ScopeId,
pub command_revision: Revision,
pub status_revision: Revision,
pub status: S,
}Expand description
Canonical host report for a resource command observed outside the graph.
Fields§
§resource_key: ResourceKeyStable graph-visible resource identity.
scope: ScopeIdScope associated with the command being reported.
command_revision: RevisionGraph revision of the resource command the host is reporting for.
status_revision: RevisionMonotonic host observation revision.
status: SApplication-defined status payload.
Implementations§
Source§impl<S> HostResourceStatus<S>
impl<S> HostResourceStatus<S>
Sourcepub fn new(
resource_key: ResourceKey,
scope: ScopeId,
command_revision: Revision,
status_revision: Revision,
status: S,
) -> Self
pub fn new( resource_key: ResourceKey, scope: ScopeId, command_revision: Revision, status_revision: Revision, status: S, ) -> Self
Creates a host resource status input.
Sourcepub const fn category(&self) -> ErrorCategory
pub const fn category(&self) -> ErrorCategory
Returns the model category for host-reported resource status.
Sourcepub fn map_status<T>(self, map: impl FnOnce(S) -> T) -> HostResourceStatus<T>
pub fn map_status<T>(self, map: impl FnOnce(S) -> T) -> HostResourceStatus<T>
Maps the status payload while preserving structural identity.
Trait Implementations§
Source§impl<S: Clone> Clone for HostResourceStatus<S>
impl<S: Clone> Clone for HostResourceStatus<S>
Source§fn clone(&self) -> HostResourceStatus<S>
fn clone(&self) -> HostResourceStatus<S>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<S: Debug> Debug for HostResourceStatus<S>
impl<S: Debug> Debug for HostResourceStatus<S>
impl<S: Eq> Eq for HostResourceStatus<S>
Source§impl<S: PartialEq> PartialEq for HostResourceStatus<S>
impl<S: PartialEq> PartialEq for HostResourceStatus<S>
Source§fn eq(&self, other: &HostResourceStatus<S>) -> bool
fn eq(&self, other: &HostResourceStatus<S>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<S: PartialEq> StructuralPartialEq for HostResourceStatus<S>
Auto Trait Implementations§
impl<S> Freeze for HostResourceStatus<S>where
S: Freeze,
impl<S> RefUnwindSafe for HostResourceStatus<S>where
S: RefUnwindSafe,
impl<S> Send for HostResourceStatus<S>where
S: Send,
impl<S> Sync for HostResourceStatus<S>where
S: Sync,
impl<S> Unpin for HostResourceStatus<S>where
S: Unpin,
impl<S> UnsafeUnpin for HostResourceStatus<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for HostResourceStatus<S>where
S: UnwindSafe,
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