pub struct CodeContext {
pub uri: String,
pub position: Position,
pub visible_range: Option<Range>,
}Expand description
Code context sent to Copilot
Fields§
§uri: StringThe text document URI
position: PositionPosition in the document
visible_range: Option<Range>Visible range in the editor
Implementations§
Trait Implementations§
Source§impl Clone for CodeContext
impl Clone for CodeContext
Source§fn clone(&self) -> CodeContext
fn clone(&self) -> CodeContext
Returns a duplicate of the value. Read more
1.0.0 · 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 CodeContext
impl Debug for CodeContext
Source§impl<'de> Deserialize<'de> for CodeContext
impl<'de> Deserialize<'de> for CodeContext
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
Source§impl PartialEq for CodeContext
impl PartialEq for CodeContext
Source§impl Serialize for CodeContext
impl Serialize for CodeContext
impl StructuralPartialEq for CodeContext
Auto Trait Implementations§
impl Freeze for CodeContext
impl RefUnwindSafe for CodeContext
impl Send for CodeContext
impl Sync for CodeContext
impl Unpin for CodeContext
impl UnwindSafe for CodeContext
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