Enum dicom_parser::dataset::DataToken[][src]

pub enum DataToken {
    ElementHeader(DataElementHeader),
    SequenceStart {
        tag: Tag,
        len: Length,
    },
    PixelSequenceStart,
    SequenceEnd,
    ItemStart {
        len: Length,
    },
    ItemEnd,
    PrimitiveValue(PrimitiveValue),
    ItemValue(Vec<u8>),
}

A token of a DICOM data set stream. This is part of the interpretation of a data set as a stream of symbols, which may either represent data headers or actual value data.

Variants

ElementHeader(DataElementHeader)

A data header of a primitive value.

SequenceStart

The beginning of a sequence element.

Show fields

Fields of SequenceStart

tag: Taglen: Length
PixelSequenceStart

The beginning of an encapsulated pixel data element.

SequenceEnd

The ending delimiter of a sequence or encapsulated pixel data.

ItemStart

The beginning of a new item in the sequence.

Show fields

Fields of ItemStart

len: Length
ItemEnd

The ending delimiter of an item.

PrimitiveValue(PrimitiveValue)

A primitive data element value.

ItemValue(Vec<u8>)

An owned piece of raw data representing an item’s value.

This variant is used to represent the value of an offset table or a compressed fragment. It should not be used to represent nested data sets.

Implementations

impl DataToken[src]

pub fn is_sequence_start(&self) -> bool[src]

Check whether this token represents the start of a sequence of nested data sets.

pub fn is_sequence_end(&self) -> bool[src]

Check whether this token represents the end of a sequence or the end of an encapsulated element.

Trait Implementations

impl Clone for DataToken[src]

impl Debug for DataToken[src]

impl Display for DataToken[src]

impl From<DataElementHeader> for DataToken[src]

impl PartialEq<DataToken> for DataToken[src]

This implementation treats undefined lengths as equal.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.