dvb-subtitle 0.1.0

DVB subtitling (bitmap) segment parser — ETSI EN 300 743, the segments carried in subtitle PES.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Subtitling-specific traits. `Parse` is provided by `dvb_common`.

use dvb_common::Parse;

/// Implemented by every typed subtitling segment; drives
/// [`crate::any::AnySegment`] dispatch. `SEGMENT_TYPE` is the wire
/// segment_type this type parses.
pub trait SegmentDef<'a>: Parse<'a, Error = crate::error::Error> {
    /// Wire segment_type.
    const SEGMENT_TYPE: u8;
    /// Diagnostic name. Convention: SCREAMING_SNAKE, suffix-free —
    /// `PAGE_COMPOSITION`, `REGION_COMPOSITION`, `OBJECT_DATA`.
    const NAME: &'static str;
}