pub struct Context {
pub app_id: Option<String>,
pub app_name: Option<String>,
pub window_title: Option<String>,
pub surrounding_text: Option<String>,
pub clipboard_text: Option<String>,
pub file_language: Option<String>,
pub vocabulary_hints: Vec<String>,
pub suggested_mode: Option<DictationMode>,
}Expand description
Runtime context gathered from the user’s environment. Fields are all optional — providers fill in what they can.
Fields§
§app_id: Option<String>Bundle ID or process identifier of the focused application (e.g. “com.microsoft.VSCode”)
app_name: Option<String>Human-readable name of the focused application (e.g. “Visual Studio Code”)
window_title: Option<String>Title of the focused window
surrounding_text: Option<String>Text surrounding the cursor in the active text field (~50 chars before cursor)
clipboard_text: Option<String>Current clipboard text content
file_language: Option<String>Programming language of the current file (if detectable)
vocabulary_hints: Vec<String>Vocabulary terms to bias Whisper toward
suggested_mode: Option<DictationMode>Suggested dictation mode based on context
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnsafeUnpin for Context
impl UnwindSafe for Context
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