Skip to main content

Settle

Struct Settle 

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

Three-phase model per spec §7, so Plan 2’s renderer and Plan 3’s async swap EXTEND this type instead of rewriting it:

  • live — the jittering partial hypothesis (not committed)
  • committing — the most recent phrase, shown bright with deterministic-Light, still inside the decode-lag / async-swap window (may be upgraded or take a late STT revision)
  • settled — finalized, immutable blocks (never move again)

Implementations§

Source§

impl Settle

Source

pub fn new() -> Self

Source

pub fn on_partial(&mut self, partial: &str)

A new/revised partial hypothesis for the live edge.

Source

pub fn commit(&mut self, raw: &str, clean: &str)

Endpoint boundary: the live edge becomes the committing block (clean is the deterministic-Light result). Any prior committing block’s window has closed, so it is finalized into settled first.

Source

pub fn finalize(&mut self)

Promote the committing block to settled (its lag/swap window elapsed).

Source

pub fn upgrade_committing(&mut self, clean: &str) -> bool

Plan 3 async LLM swap: replace the committing block’s clean text while still inside its window. No-op (returns false) once finalized — the settled rule wins.

Source

pub fn revise_committing(&mut self, raw: &str, clean: &str) -> bool

Plan 5 second-pass swap: replace BOTH raw and clean of the committing block (a better transcription of the same audio, not a reformat). No-op once finalized — the settled rule wins, exactly like upgrade_committing.

Source

pub fn try_late_revision_settled( &mut self, _index: usize, _new_text: &str, ) -> bool

A late STT revision targeting already-settled text is DROPPED (returns false so the caller can log it to the raw layer).

Source

pub fn settled(&self) -> &[Block]

Source

pub fn committing(&self) -> Option<&Block>

Source

pub fn live(&self) -> &str

Source

pub fn committing_revised(&self) -> bool

True once the committing block has been revised/upgraded (its text is final-quality). Drives the bright-is-final rendering: dim until revised.

Trait Implementations§

Source§

impl Default for Settle

Source§

fn default() -> Settle

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

Auto Trait Implementations§

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.