pub struct RiskSignal {
pub kind: RiskSignalKind,
pub anchor: SignalAnchor,
pub reason: String,
pub producer: ProducerId,
pub computed_at: i64,
pub computed_against: Option<ChangeId>,
}Fields§
§kind: RiskSignalKind§anchor: SignalAnchor§reason: String§producer: ProducerId§computed_at: i64Unix epoch seconds.
computed_against: Option<ChangeId>Optional state this signal was computed against. Useful for retracing when a signal moves between renders (e.g., anchor travel after a rename).
Implementations§
Source§impl RiskSignal
impl RiskSignal
pub fn validate(&self) -> Result<(), RiskSignalError>
Sourcepub fn anchor_key(&self) -> String
pub fn anchor_key(&self) -> String
Stable canonical anchor string used to group signals on the same anchor during render-time budgeting. The format is intentionally simple so budgeting comparisons are cheap and order-independent.
Trait Implementations§
Source§impl Clone for RiskSignal
impl Clone for RiskSignal
Source§fn clone(&self) -> RiskSignal
fn clone(&self) -> RiskSignal
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 RiskSignal
impl Debug for RiskSignal
Source§impl<'de> Deserialize<'de> for RiskSignal
impl<'de> Deserialize<'de> for RiskSignal
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
Source§impl PartialEq for RiskSignal
impl PartialEq for RiskSignal
Source§fn eq(&self, other: &RiskSignal) -> bool
fn eq(&self, other: &RiskSignal) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for RiskSignal
impl Serialize for RiskSignal
impl Eq for RiskSignal
impl StructuralPartialEq for RiskSignal
Auto Trait Implementations§
impl Freeze for RiskSignal
impl RefUnwindSafe for RiskSignal
impl Send for RiskSignal
impl Sync for RiskSignal
impl Unpin for RiskSignal
impl UnsafeUnpin for RiskSignal
impl UnwindSafe for RiskSignal
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