pub struct JavaScriptParser { /* private fields */ }Expand description
JavaScript parser for extracting endpoints from JavaScript code
Implementations§
Source§impl JavaScriptParser
impl JavaScriptParser
Sourcepub fn extract_endpoints(&self, js_content: &str, base_url: &Url) -> Vec<Url>
pub fn extract_endpoints(&self, js_content: &str, base_url: &Url) -> Vec<Url>
Extract endpoints from JavaScript content
Sourcepub fn extract_endpoints_with_confidence(
&self,
js_content: &str,
base_url: &Url,
) -> Vec<(Url, f32)>
pub fn extract_endpoints_with_confidence( &self, js_content: &str, base_url: &Url, ) -> Vec<(Url, f32)>
Extract endpoints from JavaScript content together with a confidence score.
Each returned (Url, f32) pair contains the discovered endpoint and a
confidence value in [0.0, 1.0] indicating how reliable the extraction
pattern is. Callers can filter on the confidence value to reduce false
positives from speculative patterns (e.g. import paths).
Framework-specific patterns are assigned a confidence of 0.85.
Trait Implementations§
Source§impl Clone for JavaScriptParser
impl Clone for JavaScriptParser
Source§fn clone(&self) -> JavaScriptParser
fn clone(&self) -> JavaScriptParser
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for JavaScriptParser
impl RefUnwindSafe for JavaScriptParser
impl Send for JavaScriptParser
impl Sync for JavaScriptParser
impl Unpin for JavaScriptParser
impl UnsafeUnpin for JavaScriptParser
impl UnwindSafe for JavaScriptParser
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