rustduck-core 1.1.0

Safe typed TSDuck core bindings for rustduck
Documentation
//! Typed, bounded memory endpoints for TSDuck `memory` plugins.
//!
//! Endpoints are `Send + Sync` because they contain only synchronized Rust
//! queue state. They are not raw native handles; `TSProcessor` and
//! `InputSwitcher` perform private native registration.

mod callback;
mod endpoint;
mod queue;
mod registry;

pub(crate) use callback::install_dispatcher;
pub(crate) use endpoint::{MemoryInputBinding, MemoryOutputBinding};

pub use endpoint::{CallbackError, MemoryInput, MemoryOutput};

/// Queue behavior when there is no capacity for another complete payload.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum MemoryQueuePolicy {
    /// Reject the incoming payload and record its byte count as dropped.
    Drop,
    /// Block the producer until capacity, close, or abort changes the state.
    Backpressure,
}

/// Outcome of an accepted or dropped input push.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum MemoryPushOutcome {
    /// The complete packet-aligned payload entered the queue.
    Accepted,
    /// The configured drop policy rejected the complete payload.
    Dropped,
}