pub struct MatchResult {
pub id: String,
pub uuid: Option<String>,
pub path: String,
pub node_kind: String,
pub name: String,
pub view: MatchView,
}Expand description
マッチ結果
§設計方針
- SymbolId が主キー: これだけで処理に十分
- SymbolPath: フルパスでシンボルを特定可能
- file_path/line は含めない: Spanを保持しない方針。ModPathで大体わかる
- ファイル参照が必要な場合: Grep等で対応可能
- ViewMode別データ: MatchViewで型安全に表現
この設計により、結果がコンパクトになりAIエージェントが扱いやすくなる。
Fields§
§id: StringSymbolId: slotmap key (e.g., “SymbolId(172v1)”)
Warning: This ID is session-volatile. It changes when the server restarts.
For persistent references across sessions, use uuid instead.
uuid: Option<String>Persistent UUID for cross-session symbol tracking.
This UUID survives server restarts and symbol renames.
Use this for storing references that need to persist.
Returns None if the symbol hasn’t been assigned a persistent ID.
path: StringSymbolPath: Full path (e.g., “ryo_analysis::registry::DetectRegistry”)
node_kind: StringItem kind (Function, Struct, Enum, etc.)
name: StringSymbol name (e.g., “Node”)
view: MatchViewViewMode別のデータ
Trait Implementations§
Source§impl Clone for MatchResult
impl Clone for MatchResult
Source§fn clone(&self) -> MatchResult
fn clone(&self) -> MatchResult
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 MatchResult
impl Debug for MatchResult
Source§impl<'de> Deserialize<'de> for MatchResult
impl<'de> Deserialize<'de> for MatchResult
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
Source§impl JsonSchema for MatchResult
impl JsonSchema for MatchResult
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for MatchResult
impl RefUnwindSafe for MatchResult
impl Send for MatchResult
impl Sync for MatchResult
impl Unpin for MatchResult
impl UnsafeUnpin for MatchResult
impl UnwindSafe for MatchResult
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<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