Skip to main content

SegmentDef

Trait SegmentDef 

Source
pub trait SegmentDef<'a>: Parse<'a, Error = Error> {
    const SEGMENT_TYPE: u8;
    const NAME: &'static str;
}
Expand description

Implemented by every typed subtitling segment; drives crate::any::AnySegment dispatch. SEGMENT_TYPE is the wire segment_type this type parses.

Required Associated Constants§

Source

const SEGMENT_TYPE: u8

Wire segment_type.

Source

const NAME: &'static str

Diagnostic name. Convention: SCREAMING_SNAKE, suffix-free — PAGE_COMPOSITION, REGION_COMPOSITION, OBJECT_DATA.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl SegmentDef<'_> for AlternativeClutSegment

Source§

const SEGMENT_TYPE: u8 = segments::alternative_clut::SEGMENT_TYPE

Source§

const NAME: &'static str = "ALTERNATIVE_CLUT"

Source§

impl SegmentDef<'_> for ClutDefinitionSegment

Source§

const SEGMENT_TYPE: u8 = segments::clut_definition::SEGMENT_TYPE

Source§

const NAME: &'static str = "CLUT_DEFINITION"

Source§

impl SegmentDef<'_> for DisparitySignallingSegment

Source§

const SEGMENT_TYPE: u8 = segments::disparity_signalling::SEGMENT_TYPE

Source§

const NAME: &'static str = "DISPARITY_SIGNALLING"

Source§

impl SegmentDef<'_> for DisplayDefinitionSegment

Source§

const SEGMENT_TYPE: u8 = segments::display_definition::SEGMENT_TYPE

Source§

const NAME: &'static str = "DISPLAY_DEFINITION"

Source§

impl SegmentDef<'_> for EndOfDisplaySetSegment

Source§

const SEGMENT_TYPE: u8 = segments::end_of_display_set::SEGMENT_TYPE

Source§

const NAME: &'static str = "END_OF_DISPLAY_SET"

Source§

impl SegmentDef<'_> for PageCompositionSegment

Source§

const SEGMENT_TYPE: u8 = segments::page_composition::SEGMENT_TYPE

Source§

const NAME: &'static str = "PAGE_COMPOSITION"

Source§

impl SegmentDef<'_> for RegionCompositionSegment

Source§

const SEGMENT_TYPE: u8 = segments::region_composition::SEGMENT_TYPE

Source§

const NAME: &'static str = "REGION_COMPOSITION"

Source§

impl<'a> SegmentDef<'a> for ObjectDataSegment<'a>

Source§

const SEGMENT_TYPE: u8 = segments::object_data::SEGMENT_TYPE

Source§

const NAME: &'static str = "OBJECT_DATA"

Source§

impl<'a> SegmentDef<'a> for StuffingSegment<'a>

Source§

const SEGMENT_TYPE: u8 = segments::stuffing::SEGMENT_TYPE

Source§

const NAME: &'static str = "STUFFING"