pub struct TSProcessor { /* private fields */ }Expand description
A !Send + !Sync TSDuck processor owner.
native is declared before the report, private handler, and endpoint
leases. Therefore the native processor is deleted before any object it can
borrow. Drop aborts and waits for active work before that deletion.
Implementations§
Source§impl TSProcessor
impl TSProcessor
Sourcepub fn report(&self) -> &Rc<Report>
pub fn report(&self) -> &Rc<Report>
Returns the report retained for the processor’s native lifetime.
Sourcepub fn abort_token(&self) -> AbortToken
pub fn abort_token(&self) -> AbortToken
Returns a cloneable token that can request termination from any thread.
The token is request-only: native waiting and destruction remain on the thread that owns this processor.
Sourcepub fn start(&mut self, config: &ProcessorConfig) -> Result<()>
pub fn start(&mut self, config: &ProcessorConfig) -> Result<()>
Starts native processing with typed plugins and optional memory endpoints.
Sourcepub fn abort(&mut self) -> Result<()>
pub fn abort(&mut self) -> Result<()>
Requests processor abort. The host remains owned by this thread.
Sourcepub fn try_wait(&mut self) -> Result<WaitStatus>
pub fn try_wait(&mut self) -> Result<WaitStatus>
Performs a non-blocking owner-thread termination check.
This is intentionally a native state probe, not a helper-thread wait.
A returned WaitStatus::Stopped has the same cleanup effect as
Self::wait_for_termination.
Sourcepub fn wait_for_termination(&mut self) -> Result<()>
pub fn wait_for_termination(&mut self) -> Result<()>
Waits for native processing to terminate.
Sourcepub fn take_memory_error(&self) -> Option<CallbackError>
pub fn take_memory_error(&self) -> Option<CallbackError>
Takes the latest structured error produced by a bound memory endpoint.