Skip to main content

Known

Struct Known 

Source
pub struct Known { /* private fields */ }
Expand description

What a store already holds, so an episode read again (the transcript sweep, session end, borg assimilate) is never appended twice. Read once, then grown with what is appended.

Implementations§

Source§

impl Known

Source

pub fn read(store: &Path) -> Self

The episodes of store’s episodes.jsonl.

Source

pub fn holds(&self, e: &Episode) -> bool

Whether e is already held: an episode with its id; one of its session with the same words that no transcript named by its call (the hook stamps capture time, a transcript message time, so their ids differ; two calls the transcript named are two events, whatever their words); or, for a prompt’s episode, a prompt’s of its session within SAME_MS (the hook and the transcript cut a prompt alike, but an older store’s wording may differ). An answer is matched by its id alone: only a transcript records answers, and the same pick to two questions is two answers.

Source

pub fn add(&mut self, e: &Episode)

Remember e as held.

Trait Implementations§

Source§

impl Debug for Known

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Known

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Known

§

impl RefUnwindSafe for Known

§

impl Send for Known

§

impl Sync for Known

§

impl Unpin for Known

§

impl UnsafeUnpin for Known

§

impl UnwindSafe for Known

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.