pub struct AffinityScope {
pub warmth: bool,
pub trust: bool,
pub intrigue: bool,
pub intimacy: bool,
pub patience: bool,
pub tension: bool,
}Expand description
Resolved set of affinity axes to inject. Default = bond.
Fields§
§warmth: bool§trust: bool§intrigue: bool§intimacy: bool§patience: bool§tension: boolImplementations§
Source§impl AffinityScope
impl AffinityScope
pub fn none() -> Self
pub fn full() -> Self
pub fn from_axes(axes: &[AffinityAxis]) -> Self
pub fn contains(self, axis: AffinityAxis) -> bool
pub fn is_empty(self) -> bool
Sourcepub fn active_count(self) -> usize
pub fn active_count(self) -> usize
Number of axes that are active (0..=6). Used for observability tracing.
Sourcepub fn length_score(self, a: &Affinity) -> Option<f64>
pub fn length_score(self, a: &Affinity) -> Option<f64>
Composite length score per the #40 spec. None when no axis is in scope
(caller falls back to the strictest tier, matching affinity = None).
Trait Implementations§
Source§impl Clone for AffinityScope
impl Clone for AffinityScope
Source§fn clone(&self) -> AffinityScope
fn clone(&self) -> AffinityScope
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 moreimpl Copy for AffinityScope
Source§impl Debug for AffinityScope
impl Debug for AffinityScope
Source§impl Default for AffinityScope
impl Default for AffinityScope
Source§impl<'de> Deserialize<'de> for AffinityScope
impl<'de> Deserialize<'de> for AffinityScope
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 AffinityScope
Source§impl PartialEq for AffinityScope
impl PartialEq for AffinityScope
Source§fn eq(&self, other: &AffinityScope) -> bool
fn eq(&self, other: &AffinityScope) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AffinityScope
impl Serialize for AffinityScope
impl StructuralPartialEq for AffinityScope
Auto Trait Implementations§
impl Freeze for AffinityScope
impl RefUnwindSafe for AffinityScope
impl Send for AffinityScope
impl Sync for AffinityScope
impl Unpin for AffinityScope
impl UnsafeUnpin for AffinityScope
impl UnwindSafe for AffinityScope
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