pub struct SessionCompletionItem {
pub insert_text: String,
pub kind: Option<String>,
pub label: Option<String>,
pub range_end: Option<i64>,
pub range_start: Option<i64>,
}Expand description
A single host-driven completion. Accepting an item replaces [rangeStart, rangeEnd) (UTF-16 code units) in the composer with insertText; when the range is absent, the active token around the cursor is replaced.
Experimental. This type is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases.
Fields§
§insert_text: StringText spliced into the composer when the item is accepted.
kind: Option<String>Render-kind hint for the picker row (e.g. "document", "directory"), derived from the host’s display kind.
label: Option<String>Primary display label for the picker row. Falls back to insertText when absent.
range_end: Option<i64>End (exclusive) of the replacement range in text, in UTF-16 code units.
range_start: Option<i64>Start of the replacement range in text, in UTF-16 code units.
Trait Implementations§
Source§impl Clone for SessionCompletionItem
impl Clone for SessionCompletionItem
Source§fn clone(&self) -> SessionCompletionItem
fn clone(&self) -> SessionCompletionItem
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 SessionCompletionItem
impl Debug for SessionCompletionItem
Source§impl Default for SessionCompletionItem
impl Default for SessionCompletionItem
Source§fn default() -> SessionCompletionItem
fn default() -> SessionCompletionItem
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SessionCompletionItem
impl<'de> Deserialize<'de> for SessionCompletionItem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SessionCompletionItem
impl RefUnwindSafe for SessionCompletionItem
impl Send for SessionCompletionItem
impl Sync for SessionCompletionItem
impl Unpin for SessionCompletionItem
impl UnsafeUnpin for SessionCompletionItem
impl UnwindSafe for SessionCompletionItem
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