pub struct ComposerModel { /* private fields */ }Expand description
Pure composer state. It owns no runtime and performs no I/O.
Implementations§
Source§impl ComposerModel
impl ComposerModel
pub fn new(descriptor: &FrontendRuntimeDescriptor) -> Self
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: &FrontendEvent) -> bool
pub fn apply_event(&mut self, event: &FrontendEvent) -> 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 moreAuto 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