#[non_exhaustive]pub struct RenderOptions {
pub input_label: String,
pub max_traces_embedded: Option<usize>,
pub pg_stat: Option<PgStatReport>,
pub mysql_stat: Option<MySqlStatReport>,
pub diff: Option<DiffReport>,
pub daemon_url: Option<String>,
}Expand description
Options controlling HTML rendering.
#[non_exhaustive] for SemVer-minor field additions (0.9.5 added
mysql_stat); struct literals (including functional record update)
do not compile outside this crate, so external crates start from
RenderOptions::default() and set the public fields one by one.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.input_label: StringLabel shown in the top bar (filename, - for stdin, etc.).
max_traces_embedded: Option<usize>Explicit cap on embedded traces. When None, the sink trims to
fit [DEFAULT_SIZE_TARGET_BYTES] using the top-waste fallback.
pg_stat: Option<PgStatReport>Optional pg_stat_statements report embedded alongside the
analysis. When Some, the HTML dashboard exposes a pg_stat tab
plus the Explain-to-pg_stat cross-navigation for matching SQL
templates.
mysql_stat: Option<MySqlStatReport>Optional MySQL Performance Schema digest report embedded
alongside the analysis. When Some, the HTML dashboard exposes
a mysql_stat tab with the same ranking sub-switcher as
pg_stat.
diff: Option<DiffReport>Optional diff against a baseline run embedded alongside the
analysis. When Some, the HTML dashboard exposes a Diff tab
with new/resolved findings, severity changes, and per-endpoint
deltas.
daemon_url: Option<String>When Some, the generated HTML enables live mode: the in-page
JavaScript connects to the daemon at this URL for ack/revoke
interactions, fetches the daemon-side acks listing, and shows a
connection-status indicator. Reveals the auth-key prompt modal
on a 401 response. The daemon must have CORS configured (see
[daemon.cors] in CONFIGURATION.md) and the document origin
allowed.
When None, the HTML is purely static: no badge, no
ack/revoke buttons, no acknowledgments panel, strict CSP with
no connect-src directive.
The URL is expected to have been validated by the caller. The
renderer trusts it as-is and concatenates it into the
Content-Security-Policy connect-src directive. Validation
rejects userinfo, paths, query strings and ASCII control
characters via crates/sentinel-cli/src/ack.rs::validate_url.
The browser-side handlers (auth-key prompt, ack/revoke modal,
fetch retry) live in the live-mode IIFE block at the bottom
of crates/sentinel-core/src/report/html_template.html.
Trait Implementations§
Source§impl Clone for RenderOptions
impl Clone for RenderOptions
Source§fn clone(&self) -> RenderOptions
fn clone(&self) -> RenderOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RenderOptions
impl Debug for RenderOptions
Source§impl Default for RenderOptions
impl Default for RenderOptions
Source§fn default() -> RenderOptions
fn default() -> RenderOptions
Auto Trait Implementations§
impl Freeze for RenderOptions
impl RefUnwindSafe for RenderOptions
impl Send for RenderOptions
impl Sync for RenderOptions
impl Unpin for RenderOptions
impl UnsafeUnpin for RenderOptions
impl UnwindSafe for RenderOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request