pub struct AutoMemory {
pub recall: bool,
pub retain: bool,
/* private fields */
}Expand description
Whether automatic recall and retain are on for a session, and when recall may run again.
Fields§
§recall: bool§retain: boolImplementations§
Source§impl AutoMemory
impl AutoMemory
Sourcepub fn new(settings: &Value, explicit_server: bool) -> AutoMemory
pub fn new(settings: &Value, explicit_server: bool) -> AutoMemory
From the merged settings (memory.autoRecall, memory.autoRetain: a boolean decides) and whether the
Hindsight server was set explicitly (the default for both).
Sourcepub fn recall_ready(&self) -> bool
pub fn recall_ready(&self) -> bool
Whether recall runs now (on, and not paused after a failure).
Sourcepub fn idle_due(&self, active: bool, now: Instant) -> bool
pub fn idle_due(&self, active: bool, now: Instant) -> bool
Whether to keep the tail now: once per quiet stretch, when the session has been quiet (IDLE_RETAIN) since
it was last active (as of now).
Sourcepub fn recall(&self, stack: &Arc<Stack>, text: &str, shown: &Shown) -> Recalled
pub fn recall(&self, stack: &Arc<Stack>, text: &str, shown: &Shown) -> Recalled
The memories to open a run of text with, not in shown: at most RECALL_LIMIT, and the project’s brief
unless shown, waited for at most RECALL_TIMEOUT; nothing when the session has no memory, the message is
too short, or the recall fails. A brief that fails or has no content yet leaves the recall alone.
Auto Trait Implementations§
impl !Freeze for AutoMemory
impl Forget for AutoMemory
impl Move for AutoMemory
impl RefUnwindSafe for AutoMemory
impl Send for AutoMemory
impl Sync for AutoMemory
impl Unpin for AutoMemory
impl UnsafeUnpin for AutoMemory
impl UnwindSafe for AutoMemory
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