pub struct IdeClient { /* private fields */ }Expand description
MCP Client for IDE communication
Implementations§
Source§impl IdeClient
impl IdeClient
Sourcepub fn is_ide_available(&self) -> bool
pub fn is_ide_available(&self) -> bool
Check if IDE integration is available
Sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Check if connected to IDE
Sourcepub fn status(&self) -> ConnectionStatus
pub fn status(&self) -> ConnectionStatus
Get connection status
Sourcepub async fn open_diff(
&self,
file_path: &str,
new_content: &str,
) -> Result<DiffResult, IdeError>
pub async fn open_diff( &self, file_path: &str, new_content: &str, ) -> Result<DiffResult, IdeError>
Open a diff view in the IDE
This sends the file path and new content to the IDE, which will show a diff view. The method returns when the user accepts or rejects the diff.
Sourcepub async fn close_diff(
&self,
file_path: &str,
) -> Result<Option<String>, IdeError>
pub async fn close_diff( &self, file_path: &str, ) -> Result<Option<String>, IdeError>
Close a diff view in the IDE
Sourcepub fn handle_notification(&self, notification: JsonRpcNotification)
pub fn handle_notification(&self, notification: JsonRpcNotification)
Handle an incoming notification from the IDE
Sourcepub async fn disconnect(&mut self)
pub async fn disconnect(&mut self)
Disconnect from the IDE
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IdeClient
impl !RefUnwindSafe for IdeClient
impl Send for IdeClient
impl Sync for IdeClient
impl Unpin for IdeClient
impl !UnwindSafe for IdeClient
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
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> 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