pub struct NarrativeState {
pub last_update_ms: u64,
pub session_count: u64,
pub emotion: [f32; 21],
pub narrative: String,
}Expand description
A rendszer belső narratívája — egy snapshot arról, “ki most ő”.
Fields§
§last_update_ms: u64Mikor frissült utoljára.
session_count: u64Hány interakciója volt életében.
emotion: [f32; 21]Aktuális érzelmi állapot.
narrative: StringA legutóbbi narratíva mondat.
Implementations§
Source§impl NarrativeState
impl NarrativeState
Sourcepub fn load_or_init(output_dir: &Path) -> Self
pub fn load_or_init(output_dir: &Path) -> Self
Betöltés NAR1 file-ból, vagy friss generálás a jelenlegi állapotból.
Sourcepub fn update(
&mut self,
output_dir: &Path,
esr: Option<&EmotionalStateRing>,
wm_items: Option<&[String]>,
due_count: Option<usize>,
thought_count: Option<usize>,
query: Option<&str>,
) -> Result<(), String>
pub fn update( &mut self, output_dir: &Path, esr: Option<&EmotionalStateRing>, wm_items: Option<&[String]>, due_count: Option<usize>, thought_count: Option<usize>, query: Option<&str>, ) -> Result<(), String>
Frissíti a narratívát a jelenlegi rendszerállapotból. Ezt kell minden interakció után hívni.
Auto Trait Implementations§
impl Freeze for NarrativeState
impl RefUnwindSafe for NarrativeState
impl Send for NarrativeState
impl Sync for NarrativeState
impl Unpin for NarrativeState
impl UnsafeUnpin for NarrativeState
impl UnwindSafe for NarrativeState
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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