pub struct EventHandlerContext<'a> {
pub colors: &'a Colors,
pub verbosity: Verbosity,
pub display_name: &'a str,
pub streaming_session: &'a Rc<RefCell<StreamingSession>>,
pub reasoning_accumulator: &'a Rc<RefCell<DeltaAccumulator>>,
pub terminal_mode: TerminalMode,
pub show_streaming_metrics: bool,
pub last_rendered_content: &'a RefCell<HashMap<String, String>>,
}Fields§
§colors: &'a Colors§verbosity: Verbosity§display_name: &'a str§streaming_session: &'a Rc<RefCell<StreamingSession>>§reasoning_accumulator: &'a Rc<RefCell<DeltaAccumulator>>§terminal_mode: TerminalMode§show_streaming_metrics: bool§last_rendered_content: &'a RefCell<HashMap<String, String>>Implementations§
Source§impl<'a> EventHandlerContext<'a>
impl<'a> EventHandlerContext<'a>
pub fn with_session_mut<R>( &self, f: impl FnOnce(&mut StreamingSession) -> R, ) -> R
pub fn with_reasoning_accumulator_mut<R>( &self, f: impl FnOnce(&mut DeltaAccumulator) -> R, ) -> R
pub fn with_last_rendered_content_mut<R>( &self, f: impl FnOnce(&mut HashMap<String, String>) -> R, ) -> R
Auto Trait Implementations§
impl<'a> Freeze for EventHandlerContext<'a>
impl<'a> !RefUnwindSafe for EventHandlerContext<'a>
impl<'a> !Send for EventHandlerContext<'a>
impl<'a> !Sync for EventHandlerContext<'a>
impl<'a> Unpin for EventHandlerContext<'a>
impl<'a> UnsafeUnpin for EventHandlerContext<'a>
impl<'a> !UnwindSafe for EventHandlerContext<'a>
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