pub struct PackageIndex { /* private fields */ }Expand description
Global package index backed by libSQL.
Implementations§
Source§impl PackageIndex
impl PackageIndex
pub async fn open() -> Result<Self, PackageIndexError>
pub async fn open_in_memory() -> Result<Self, PackageIndexError>
pub async fn insert_package( &self, language: &str, name: &str, path: &str, min_version: Version, max_version: Option<Version>, ) -> Result<i64, Error>
pub async fn insert_symbol( &self, package_id: i64, name: &str, kind: &str, signature: &str, line: u32, ) -> Result<i64, Error>
pub async fn find_package( &self, language: &str, name: &str, version: Option<Version>, ) -> Result<Option<PackageRecord>, Error>
pub async fn get_symbols( &self, package_id: i64, ) -> Result<Vec<SymbolRecord>, Error>
pub async fn find_symbol( &self, language: &str, symbol_name: &str, version: Option<Version>, ) -> Result<Vec<(PackageRecord, SymbolRecord)>, Error>
pub async fn is_indexed( &self, language: &str, name: &str, ) -> Result<bool, Error>
pub async fn delete_package(&self, package_id: i64) -> Result<(), Error>
pub async fn clear(&self) -> Result<(), Error>
Auto Trait Implementations§
impl !Freeze for PackageIndex
impl !RefUnwindSafe for PackageIndex
impl Send for PackageIndex
impl Sync for PackageIndex
impl Unpin for PackageIndex
impl UnsafeUnpin for PackageIndex
impl !UnwindSafe for PackageIndex
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request