pub struct SinkRegistry { /* private fields */ }Expand description
Registry of all loaded sinks.
Implementations§
Source§impl SinkRegistry
impl SinkRegistry
Sourcepub fn global() -> &'static SinkRegistry
pub fn global() -> &'static SinkRegistry
Return the global lazily-initialized registry.
Sourcepub fn load() -> Result<Self>
pub fn load() -> Result<Self>
Load the registry from JSDET_SINKS_PATH or fall back to the embedded TOML.
Sourcepub fn permission_sinks(&self) -> Vec<&SinkDefinition>
pub fn permission_sinks(&self) -> Vec<&SinkDefinition>
Sinks that match against manifest permissions.
Sourcepub fn api_sinks(&self) -> Vec<&SinkDefinition>
pub fn api_sinks(&self) -> Vec<&SinkDefinition>
Sinks that match against API call observations.
Sourcepub fn csp_sinks(&self) -> Vec<&SinkDefinition>
pub fn csp_sinks(&self) -> Vec<&SinkDefinition>
Sinks that match against CSP checks.
Sourcepub fn observation_sinks(&self) -> Vec<&SinkDefinition>
pub fn observation_sinks(&self) -> Vec<&SinkDefinition>
Sinks that match against non-API runtime observations.
Sourcepub fn severity_to_level(&self, severity: &str) -> Level
pub fn severity_to_level(&self, severity: &str) -> Level
Convert a severity string to a SARIF level.
Trait Implementations§
Source§impl Clone for SinkRegistry
impl Clone for SinkRegistry
Source§fn clone(&self) -> SinkRegistry
fn clone(&self) -> SinkRegistry
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 SinkRegistry
impl RefUnwindSafe for SinkRegistry
impl Send for SinkRegistry
impl Sync for SinkRegistry
impl Unpin for SinkRegistry
impl UnsafeUnpin for SinkRegistry
impl UnwindSafe for SinkRegistry
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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