use super::{
DocumentIdentifier, FileDiagnosticsResponse, ProjectDiagnosticsResponse, ProjectSession,
SnapshotDiagnosticsResponse,
};
use crate::Result;
impl ProjectSession {
pub async fn get_diagnostics_for_snapshot(&self) -> Result<SnapshotDiagnosticsResponse> {
self.client()
.get_diagnostics_for_snapshot(self.snapshot().handle.clone())
.await
}
pub async fn get_diagnostics_for_project(&self) -> Result<ProjectDiagnosticsResponse> {
self.client()
.get_diagnostics_for_project(self.snapshot().handle.clone(), self.project().id.clone())
.await
}
pub async fn get_diagnostics_for_file(
&self,
file: impl Into<DocumentIdentifier>,
) -> Result<FileDiagnosticsResponse> {
self.client()
.get_diagnostics_for_file(
self.snapshot().handle.clone(),
self.project().id.clone(),
file,
)
.await
}
}