pub struct ComposerModel(/* private fields */);Implementations§
Source§impl ComposerModel
impl ComposerModel
pub fn new(descriptor: &FrontendRuntimeDescriptor) -> Self
pub fn handle_terminal_event( &mut self, event: TerminalEvent, ) -> Option<ComposerAction>
pub fn handle_key(&mut self, key: KeyEvent) -> Option<ComposerAction>
Methods from Deref<Target = NeutralComposerModel>§
pub fn capabilities(&self) -> &ComposerCapabilities
pub fn input(&self) -> &str
pub fn cursor(&self) -> usize
pub fn history(&self) -> &[String]
pub fn queued_steering(&self) -> &VecDeque<String>
pub fn turn_state(&self) -> ComposerTurnState
pub fn overlay(&self) -> Option<&ComposerOverlay>
pub fn pending_overlay_count(&self) -> usize
pub fn last_failure(&self) -> Option<&str>
pub fn record_dispatch_failure(&mut self, action: &str)
pub fn restore_request(&mut self, request: FrontendRequest) -> bool
Sourcepub fn refresh_descriptor(&mut self, descriptor: &FrontendRuntimeDescriptor)
pub fn refresh_descriptor(&mut self, descriptor: &FrontendRuntimeDescriptor)
Refresh capability declarations. An observed busy state may promote the local state, but a potentially stale idle descriptor never clears an optimistic submit; terminal events own that transition.
Sourcepub fn apply_event(&mut self, event: &SdkEvent) -> bool
pub fn apply_event(&mut self, event: &SdkEvent) -> bool
Apply a non-duplicate SDK event to local working/overlay state.
Sourcepub fn handle_input(
&mut self,
event: ComposerInputEvent,
) -> Option<ComposerAction>
pub fn handle_input( &mut self, event: ComposerInputEvent, ) -> Option<ComposerAction>
Handle one key/paste atom. Bracketed paste is inserted atomically and never interpreted as one command per line.
pub fn handle_key(&mut self, key: ComposerKey) -> Option<ComposerAction>
pub fn set_input(&mut self, input: impl Into<String>)
Trait Implementations§
Source§impl Clone for ComposerModel
impl Clone for ComposerModel
Source§fn clone(&self) -> ComposerModel
fn clone(&self) -> ComposerModel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ComposerModel
impl Debug for ComposerModel
Source§impl Deref for ComposerModel
impl Deref for ComposerModel
Auto Trait Implementations§
impl Freeze for ComposerModel
impl RefUnwindSafe for ComposerModel
impl Send for ComposerModel
impl Sync for ComposerModel
impl Unpin for ComposerModel
impl UnsafeUnpin for ComposerModel
impl UnwindSafe for ComposerModel
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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