pub struct Report { /* private fields */ }Expand description
A TSDuck report owner.
Report is !Send + !Sync. Native objects borrowing a report retain an
Rc<Report> and release their native owner before releasing that Rc.
Implementations§
Source§impl Report
impl Report
Sourcepub fn asynchronous(config: AsyncReportConfig) -> Result<Rc<Self>>
pub fn asynchronous(config: AsyncReportConfig) -> Result<Rc<Self>>
Creates an owned asynchronous report.
Sourcepub fn asynchronous_with_forwarder(
config: AsyncReportConfig,
forwarder: ReportForwarder,
) -> Result<Rc<Self>>
pub fn asynchronous_with_forwarder( config: AsyncReportConfig, forwarder: ReportForwarder, ) -> Result<Rc<Self>>
Creates an asynchronous report that forwards native diagnostics.
The callback receives an owned, decoded view only for the duration of
its invocation. It may run on a TSDuck worker or producer thread and
must not block. timed_log is rejected because TSDuck’s callback-report
ABI does not expose that option.
TSDuck’s callback-report ABI has no per-report userdata. Multiple forwarding reports can run only when they clone this same forwarder; a different destination is rejected until every active report using the current one is terminated or dropped. Each report retains its forwarding state until native asynchronous shutdown has completed.
§Errors
Returns an error when timed_log is enabled, a different forwarding
destination is active, or TSDuck cannot construct the native report.
Sourcepub fn set_max_severity(&mut self, severity: Severity) -> Result<()>
pub fn set_max_severity(&mut self, severity: Severity) -> Result<()>
Changes this report’s maximum severity.