pub struct CompactIndex {
pub v: u32,
pub names: Vec<String>,
pub tool_names: Vec<String>,
pub tool_overrides: BTreeMap<u32, String>,
pub descs: Vec<String>,
pub postings: BTreeMap<String, Vec<u32>>,
}Expand description
Compact index (v4 disk omits descs/postings; v2/v3 still load).
Fields§
§v: u32§names: Vec<String>Sorted kebab CLI names (binary-searchable for exact/prefix).
tool_names: Vec<String>Legacy v2: parallel MCP tool names (omitted in v3+).
tool_overrides: BTreeMap<u32, String>Sparse MCP names when tool_name != names[i].replace('-', '_').
descs: Vec<String>Truncated descriptions; empty on v4 disk / names-only builds.
postings: BTreeMap<String, Vec<u32>>Kebab segment → tool indices. Not persisted in v4; rebuild on load.
Implementations§
Source§impl CompactIndex
impl CompactIndex
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn has_descs(&self) -> bool
pub fn tool_name_at(&self, i: usize) -> String
pub fn desc_at(&self, i: usize) -> &str
pub fn entry_at(&self, i: usize) -> ToolIndexEntry
pub fn to_entries(&self) -> Vec<ToolIndexEntry>
Sourcepub fn to_light_tools_json(&self, entries: &[ToolIndexEntry]) -> Value
pub fn to_light_tools_json(&self, entries: &[ToolIndexEntry]) -> Value
MCP-shaped light tools (name = wire tool name) for IPC / light commands.
Trait Implementations§
Source§impl Clone for CompactIndex
impl Clone for CompactIndex
Source§fn clone(&self) -> CompactIndex
fn clone(&self) -> CompactIndex
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CompactIndex
impl Debug for CompactIndex
Source§impl<'de> Deserialize<'de> for CompactIndex
impl<'de> Deserialize<'de> for CompactIndex
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
Auto Trait Implementations§
impl Freeze for CompactIndex
impl RefUnwindSafe for CompactIndex
impl Send for CompactIndex
impl Sync for CompactIndex
impl Unpin for CompactIndex
impl UnsafeUnpin for CompactIndex
impl UnwindSafe for CompactIndex
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