pub struct ParserState {
pub terminal_mode: RefCell<TerminalMode>,
pub streaming_session: Rc<RefCell<StreamingSession>>,
pub thinking_active_index: RefCell<Option<u64>>,
pub thinking_non_tty_indices: RefCell<BTreeSet<u64>>,
pub suppress_thinking_for_message: RefCell<bool>,
pub text_line_active: RefCell<bool>,
pub cursor_up_active: RefCell<bool>,
pub last_rendered_content: RefCell<HashMap<String, String>>,
}Fields§
§terminal_mode: RefCell<TerminalMode>§streaming_session: Rc<RefCell<StreamingSession>>§thinking_active_index: RefCell<Option<u64>>§thinking_non_tty_indices: RefCell<BTreeSet<u64>>§suppress_thinking_for_message: RefCell<bool>§text_line_active: RefCell<bool>§cursor_up_active: RefCell<bool>§last_rendered_content: RefCell<HashMap<String, String>>Implementations§
Source§impl ParserState
impl ParserState
pub fn new(verbose_warnings: bool) -> Self
pub fn with_session_mut<R>( &self, f: impl FnOnce(&mut StreamingSession) -> R, ) -> R
pub fn with_cursor_up_active_mut<R>(&self, f: impl FnOnce(&mut bool) -> R) -> R
pub fn with_thinking_active_index_mut<R>( &self, f: impl FnOnce(&mut Option<u64>) -> R, ) -> R
pub fn with_thinking_non_tty_indices_mut<R>( &self, f: impl FnOnce(&mut BTreeSet<u64>) -> R, ) -> R
pub fn with_suppress_thinking_for_message_mut<R>( &self, f: impl FnOnce(&mut bool) -> R, ) -> R
pub fn with_text_line_active_mut<R>(&self, f: impl FnOnce(&mut bool) -> R) -> R
pub fn with_last_rendered_content_mut<R>( &self, f: impl FnOnce(&mut HashMap<String, String>) -> R, ) -> R
pub fn with_terminal_mode_mut<R>( &self, f: impl FnOnce(&mut TerminalMode) -> R, ) -> R
Auto Trait Implementations§
impl !Freeze for ParserState
impl !RefUnwindSafe for ParserState
impl !Send for ParserState
impl !Sync for ParserState
impl Unpin for ParserState
impl UnsafeUnpin for ParserState
impl !UnwindSafe for ParserState
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
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