Skip to main content

TSProcessor

Struct TSProcessor 

Source
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

Source

pub fn new(report: Rc<Report>) -> Result<Self>

Creates a processor bound to report.

Source

pub fn report(&self) -> &Rc<Report>

Returns the report retained for the processor’s native lifetime.

Source

pub const fn state(&self) -> HostState

Returns the observable host lifecycle state.

Source

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.

Source

pub fn start(&mut self, config: &ProcessorConfig) -> Result<()>

Starts native processing with typed plugins and optional memory endpoints.

Source

pub fn abort(&mut self) -> Result<()>

Requests processor abort. The host remains owned by this thread.

Source

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.

Source

pub fn wait_for_termination(&mut self) -> Result<()>

Waits for native processing to terminate.

Source

pub fn take_memory_error(&self) -> Option<CallbackError>

Takes the latest structured error produced by a bound memory endpoint.

Trait Implementations§

Source§

impl Drop for TSProcessor

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.