pub struct ResourceDefenseSignal { /* private fields */ }Expand description
A resource-scoped, corroborated defense signal.
The response is the aggregate of the per-observation recommend policy,
with one corroboration rule: a single standing-block recommendation is not
enough to halt, so an uncorroborated Halt is treated as Observe.
Rate-limit Backoff and transition-driven Reconsider are self-corroborated
and honored as-is.
Implementations§
Source§impl ResourceDefenseSignal
impl ResourceDefenseSignal
Sourcepub fn aggregate(
resource: EntityId,
observations: &[ResourceDefenseObservation<'_>],
) -> Self
pub fn aggregate( resource: EntityId, observations: &[ResourceDefenseObservation<'_>], ) -> Self
Aggregates the observations for one resource into a single signal.
Aggregation is order-independent: the response is the maximum of the corroborated per-observation recommendations, and the evidence set is sorted and de-duplicated.
Sourcepub const fn response(&self) -> DefenseResponse
pub const fn response(&self) -> DefenseResponse
Returns the aggregated recommendation.
Sourcepub fn supporting_evidence_ids(&self) -> &[EvidenceId]
pub fn supporting_evidence_ids(&self) -> &[EvidenceId]
Returns the sorted, de-duplicated supporting evidence ids.
Trait Implementations§
Source§impl Clone for ResourceDefenseSignal
impl Clone for ResourceDefenseSignal
Source§fn clone(&self) -> ResourceDefenseSignal
fn clone(&self) -> ResourceDefenseSignal
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 ResourceDefenseSignal
impl Debug for ResourceDefenseSignal
impl Eq for ResourceDefenseSignal
Source§impl PartialEq for ResourceDefenseSignal
impl PartialEq for ResourceDefenseSignal
impl StructuralPartialEq for ResourceDefenseSignal
Auto Trait Implementations§
impl Freeze for ResourceDefenseSignal
impl RefUnwindSafe for ResourceDefenseSignal
impl Send for ResourceDefenseSignal
impl Sync for ResourceDefenseSignal
impl Unpin for ResourceDefenseSignal
impl UnsafeUnpin for ResourceDefenseSignal
impl UnwindSafe for ResourceDefenseSignal
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more