pub struct RuntimeHealth { /* private fields */ }Expand description
Observable health snapshot without application data or secrets.
Implementations§
Source§impl RuntimeHealth
impl RuntimeHealth
Sourcepub fn new(status: RuntimeHealthStatus, checked_at_ms: u64) -> Self
pub fn new(status: RuntimeHealthStatus, checked_at_ms: u64) -> Self
Creates an empty runtime health snapshot.
Sourcepub fn with_detail(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> ContractResult<Self>
pub fn with_detail( self, key: impl Into<String>, value: impl Into<String>, ) -> ContractResult<Self>
Adds a non-sensitive diagnostic detail.
Sourcepub fn status(&self) -> RuntimeHealthStatus
pub fn status(&self) -> RuntimeHealthStatus
Returns the health status.
Sourcepub fn checked_at_ms(&self) -> u64
pub fn checked_at_ms(&self) -> u64
Returns the snapshot timestamp in Unix milliseconds.
Trait Implementations§
Source§impl Clone for RuntimeHealth
impl Clone for RuntimeHealth
Source§fn clone(&self) -> RuntimeHealth
fn clone(&self) -> RuntimeHealth
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 Debug for RuntimeHealth
impl Debug for RuntimeHealth
Source§impl<'de> Deserialize<'de> for RuntimeHealth
impl<'de> Deserialize<'de> for RuntimeHealth
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
impl Eq for RuntimeHealth
Source§impl PartialEq for RuntimeHealth
impl PartialEq for RuntimeHealth
Source§impl Serialize for RuntimeHealth
impl Serialize for RuntimeHealth
impl StructuralPartialEq for RuntimeHealth
Auto Trait Implementations§
impl Freeze for RuntimeHealth
impl RefUnwindSafe for RuntimeHealth
impl Send for RuntimeHealth
impl Sync for RuntimeHealth
impl Unpin for RuntimeHealth
impl UnsafeUnpin for RuntimeHealth
impl UnwindSafe for RuntimeHealth
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