Skip to main content

rustduck_core/memory/endpoint/
error.rs

1//! Structured endpoint failures from the private callback protocol.
2
3/// A structured failure observed in the private TSDuck `memory` callback path.
4#[derive(Debug, Clone, Copy, PartialEq, Eq)]
5#[non_exhaustive]
6pub enum CallbackError {
7    /// The event did not originate from the TSDuck `memory` plugin.
8    WrongPlugin,
9    /// The native event supplied an invalid plugin name buffer.
10    InvalidPluginName,
11    /// The event direction did not match the endpoint type.
12    InvalidEventDirection,
13    /// The native event buffer was null or had an inconsistent size relation.
14    InvalidEventBuffer,
15    /// The event byte count was not a multiple of 188 bytes.
16    InvalidPacketAlignment,
17    /// The endpoint queue was aborted while a callback was being routed.
18    QueueAborted,
19    /// Native writeback of an input payload failed.
20    NativeWritebackFailure,
21    /// Rust panicked while processing the callback and was contained.
22    Panic,
23}