#[non_exhaustive]pub enum IpcMethod {
Index,
Search,
GraphQuery,
GraphSearch,
CommunitySearch,
HybridSearch,
CloneRepo,
XrefQuery,
IndexStatus,
Unknown(String),
}Expand description
The set of IPC methods the daemon understands.
Parsed from the method field of an IpcRequest. Unrecognised method
strings are captured in the Unknown variant so
callers can return a structured method not found error rather than
silently dropping the request.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Index
Trigger indexing for a worktree.
Search
Semantic (vector) search.
GraphQuery
Code graph query.
GraphSearch
Code graph search.
CommunitySearch
Community detection search.
HybridSearch
Hybrid vector + BM25 search.
CloneRepo
Clone a repository.
XrefQuery
Cross-reference query.
IndexStatus
Check indexing status for a worktree.
Unknown(String)
An unrecognised method string.
Implementations§
Source§impl IpcMethod
impl IpcMethod
Sourcepub fn from_method_str(s: &str) -> Self
pub fn from_method_str(s: &str) -> Self
Parse a method string into the corresponding variant.
§Examples
assert_eq!(IpcMethod::from_method_str("code.search_semantic"), IpcMethod::Search);
assert_eq!(
IpcMethod::from_method_str("nonexistent"),
IpcMethod::Unknown("nonexistent".to_owned()),
);Trait Implementations§
impl Eq for IpcMethod
impl StructuralPartialEq for IpcMethod
Auto Trait Implementations§
impl Freeze for IpcMethod
impl RefUnwindSafe for IpcMethod
impl Send for IpcMethod
impl Sync for IpcMethod
impl Unpin for IpcMethod
impl UnsafeUnpin for IpcMethod
impl UnwindSafe for IpcMethod
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.