pub struct AgentBarrierResult {
pub ok: bool,
pub score: f64,
pub residuals: Vec<ResidualEvent>,
pub feedback: CorrectionDirectionSet,
pub evidence: Evidence,
}Expand description
The SDK-side barrier result (PSP-8 adapter type).
Fields§
§ok: bool§score: f64The candidate’s total energy V (used as the SRBN score).
residuals: Vec<ResidualEvent>§feedback: CorrectionDirectionSet§evidence: EvidenceImplementations§
Source§impl AgentBarrierResult
impl AgentBarrierResult
pub fn new(ok: bool, score: f64) -> Self
pub fn with_residuals(self, residuals: Vec<ResidualEvent>) -> Self
pub fn with_feedback(self, feedback: CorrectionDirectionSet) -> Self
Sourcepub fn into_srbn(
self,
name: impl Into<String>,
) -> SrbnResult<BarrierResult<CorrectionDirectionSet, Evidence>>
pub fn into_srbn( self, name: impl Into<String>, ) -> SrbnResult<BarrierResult<CorrectionDirectionSet, Evidence>>
Convert into the kernel’s srbn::BarrierResult. The first
human-readable instruction becomes the feedback string; the full
correction set rides along as the typed correction payload.
Trait Implementations§
Source§impl Clone for AgentBarrierResult
impl Clone for AgentBarrierResult
Source§fn clone(&self) -> AgentBarrierResult
fn clone(&self) -> AgentBarrierResult
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 AgentBarrierResult
impl Debug for AgentBarrierResult
Source§impl PartialEq for AgentBarrierResult
impl PartialEq for AgentBarrierResult
Source§fn eq(&self, other: &AgentBarrierResult) -> bool
fn eq(&self, other: &AgentBarrierResult) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AgentBarrierResult
Auto Trait Implementations§
impl Freeze for AgentBarrierResult
impl RefUnwindSafe for AgentBarrierResult
impl Send for AgentBarrierResult
impl Sync for AgentBarrierResult
impl Unpin for AgentBarrierResult
impl UnsafeUnpin for AgentBarrierResult
impl UnwindSafe for AgentBarrierResult
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.