@@ -223,6 +223,7 @@ impl Query {
223
223
}
224
224
}
225
225
226
+ /// Info associated with a text range.
226
227
#[ derive( Debug ) ]
227
228
pub struct RangeInfo < T > {
228
229
pub range : TextRange ,
@@ -235,6 +236,8 @@ impl<T> RangeInfo<T> {
235
236
}
236
237
}
237
238
239
+ /// Contains information about a call site. Specifically the
240
+ /// `FunctionSignature`and current parameter.
238
241
#[ derive( Debug ) ]
239
242
pub struct CallInfo {
240
243
pub signature : FunctionSignature ,
@@ -325,11 +328,12 @@ impl Analysis {
325
328
( host. analysis ( ) , file_id)
326
329
}
327
330
331
+ /// Features for Analysis.
328
332
pub fn feature_flags ( & self ) -> & FeatureFlags {
329
333
& self . db . feature_flags
330
334
}
331
335
332
- /// Debug info about the current state of the analysis
336
+ /// Debug info about the current state of the analysis.
333
337
pub fn status ( & self ) -> Cancelable < String > {
334
338
self . with_db ( |db| status:: status ( & * db) )
335
339
}
@@ -440,20 +444,23 @@ impl Analysis {
440
444
} )
441
445
}
442
446
447
+ /// Returns the definitions from the symbol at `position`.
443
448
pub fn goto_definition (
444
449
& self ,
445
450
position : FilePosition ,
446
451
) -> Cancelable < Option < RangeInfo < Vec < NavigationTarget > > > > {
447
452
self . with_db ( |db| goto_definition:: goto_definition ( db, position) )
448
453
}
449
454
455
+ /// Returns the impls from the symbol at `position`.
450
456
pub fn goto_implementation (
451
457
& self ,
452
458
position : FilePosition ,
453
459
) -> Cancelable < Option < RangeInfo < Vec < NavigationTarget > > > > {
454
460
self . with_db ( |db| impls:: goto_implementation ( db, position) )
455
461
}
456
462
463
+ /// Returns the type definitions for the symbol at `position`.
457
464
pub fn goto_type_definition (
458
465
& self ,
459
466
position : FilePosition ,
@@ -540,6 +547,7 @@ impl Analysis {
540
547
self . with_db ( |db| references:: rename ( db, position, new_name) )
541
548
}
542
549
550
+ /// Performs an operation on that may be Canceled.
543
551
fn with_db < F : FnOnce ( & db:: RootDatabase ) -> T + std:: panic:: UnwindSafe , T > (
544
552
& self ,
545
553
f : F ,
0 commit comments