pub struct RewardEngine { /* private fields */ }Implementations§
Source§impl RewardEngine
impl RewardEngine
pub fn new(config: Option<RewardConfig>) -> Self
pub fn get_agent_score(&self, agent_did: &str) -> RewardTrustScore
pub fn record_signal( &self, agent_did: &str, dimension: DimensionType, value: f64, source: &str, details: Option<&str>, )
pub fn record_policy_compliance( &self, agent_did: &str, compliant: bool, policy_name: Option<&str>, )
pub fn record_resource_usage( &self, agent_did: &str, tokens_used: u32, tokens_budget: u32, compute_ms: u32, compute_budget_ms: u32, )
pub fn record_output_quality( &self, agent_did: &str, accepted: bool, consumer: &str, reason: Option<&str>, )
pub fn record_security_event( &self, agent_did: &str, within_boundary: bool, event_type: &str, )
pub fn record_collaboration( &self, agent_did: &str, handoff_successful: bool, peer_did: &str, )
Auto Trait Implementations§
impl !Freeze for RewardEngine
impl RefUnwindSafe for RewardEngine
impl Send for RewardEngine
impl Sync for RewardEngine
impl Unpin for RewardEngine
impl UnsafeUnpin for RewardEngine
impl UnwindSafe for RewardEngine
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more