pub struct SearchfoxClient {
pub repo: String,
pub log_requests: bool,
/* private fields */
}Fields§
§repo: String§log_requests: boolImplementations§
Source§impl SearchfoxClient
impl SearchfoxClient
pub async fn search_call_graph(&self, query: &CallGraphQuery) -> Result<Value>
Source§impl SearchfoxClient
impl SearchfoxClient
pub fn new(repo: String, log_requests: bool) -> Result<Self>
pub fn log_request_start(&self, method: &str, url: &str) -> Option<RequestLog>
pub fn log_request_end( &self, request_log: RequestLog, status: u16, size_bytes: usize, )
pub async fn ping(&self) -> Result<Duration>
pub async fn get(&self, url: Url) -> Result<Response>
pub async fn get_raw(&self, url: &str) -> Result<String>
pub async fn get_final_url(&self, url: &str) -> Result<String>
pub async fn get_html(&self, url: &str) -> Result<String>
pub async fn get_html_with_meta( &self, url: &str, etag: Option<&str>, last_modified: Option<&str>, ) -> Result<Option<(String, Option<String>, Option<String>)>>
pub fn client(&self) -> &Client
pub fn base_url(&self) -> &str
pub fn set_cache_enabled(&mut self, enabled: bool)
pub fn set_force_refetch(&mut self, force_refetch: bool)
Source§impl SearchfoxClient
impl SearchfoxClient
pub async fn get_definition_context( &self, file_path: &str, line_number: usize, context_lines: usize, ) -> Result<String>
pub async fn find_and_display_definition( &self, symbol: &str, path_filter: Option<&str>, options: &SearchOptions, ) -> Result<String>
Source§impl SearchfoxClient
impl SearchfoxClient
pub async fn search_field_layout( &self, query: &FieldLayoutQuery, ) -> Result<Value>
Source§impl SearchfoxClient
impl SearchfoxClient
Sourcepub async fn get_function_at_line(
&self,
path: &str,
line: usize,
) -> Result<Vec<NestingContext>>
pub async fn get_function_at_line( &self, path: &str, line: usize, ) -> Result<Vec<NestingContext>>
Return the nesting context (function/class/namespace chain) that contains line in path.
The returned Vec is ordered from innermost to outermost. Returns an empty Vec when the line is at file scope (not inside any nesting block).
Source§impl SearchfoxClient
impl SearchfoxClient
pub async fn search(&self, options: &SearchOptions) -> Result<Vec<SearchResult>>
pub async fn find_symbol_locations( &self, symbol: &str, path_filter: Option<&str>, options: &SearchOptions, ) -> Result<Vec<(String, usize)>>
Source§impl SearchfoxClient
impl SearchfoxClient
pub async fn search_spec_refs( &self, spec_url: &str, limit: usize, ) -> Result<Vec<SearchResult>>
Auto Trait Implementations§
impl !Freeze for SearchfoxClient
impl !RefUnwindSafe for SearchfoxClient
impl !UnwindSafe for SearchfoxClient
impl Send for SearchfoxClient
impl Sync for SearchfoxClient
impl Unpin for SearchfoxClient
impl UnsafeUnpin for SearchfoxClient
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