pub enum DataToken {
ElementHeader(DataElementHeader),
SequenceStart {
tag: Tag,
len: Length,
},
PixelSequenceStart,
SequenceEnd,
ItemStart {
len: Length,
},
ItemEnd,
PrimitiveValue(PrimitiveValue),
ItemValue(Vec<u8>),
OffsetTable(Vec<u32>),
}Expand description
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.
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.
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 encoded fragment. It should not be used to represent nested data sets.
OffsetTable(Vec<u32>)
An owned sequence of unsigned 32 bit integers representing a pixel data offset table.
This variant is used to represent the byte offsets to the first byte of the Item tag of the first fragment for each frame in the sequence of items, as per PS 3.5, Section A.4.
Implementations§
Source§impl DataToken
impl DataToken
Sourcepub fn is_sequence_start(&self) -> bool
pub fn is_sequence_start(&self) -> bool
Check whether this token represents the start of a sequence of nested data sets.
Sourcepub fn is_sequence_end(&self) -> bool
pub fn is_sequence_end(&self) -> bool
Check whether this token represents the end of a sequence or the end of an encapsulated element.
Trait Implementations§
Source§impl From<DataElementHeader> for DataToken
impl From<DataElementHeader> for DataToken
Source§fn from(header: DataElementHeader) -> Self
fn from(header: DataElementHeader) -> Self
Auto Trait Implementations§
impl Forget for DataToken
impl Freeze for DataTokenwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const String is !null: Freeze,
PhantomData<String>: Freeze,
*const Tag is !null: Freeze,
PhantomData<Tag>: Freeze,
*const i16 is !null: Freeze,
PhantomData<i16>: Freeze,
*const u16 is !null: Freeze,
PhantomData<u16>: Freeze,
*const i32 is !null: Freeze,
PhantomData<i32>: Freeze,
*const u32 is !null: Freeze,
PhantomData<u32>: Freeze,
*const i64 is !null: Freeze,
PhantomData<i64>: Freeze,
*const u64 is !null: Freeze,
PhantomData<u64>: Freeze,
*const f32 is !null: Freeze,
PhantomData<f32>: Freeze,
*const f64 is !null: Freeze,
PhantomData<f64>: Freeze,
*const DicomDate is !null: Freeze,
PhantomData<DicomDate>: Freeze,
*const DicomDateTime is !null: Freeze,
PhantomData<DicomDateTime>: Freeze,
*const DicomTime is !null: Freeze,
PhantomData<DicomTime>: Freeze,
impl Move for DataToken
impl RefUnwindSafe for DataTokenwhere
String: RefUnwindSafe,
Tag: RefUnwindSafe,
u8: RefUnwindSafe,
i16: RefUnwindSafe,
u16: RefUnwindSafe,
i32: RefUnwindSafe,
u32: RefUnwindSafe,
i64: RefUnwindSafe,
u64: RefUnwindSafe,
f32: RefUnwindSafe,
f64: RefUnwindSafe,
DicomDate: RefUnwindSafe,
DicomDateTime: RefUnwindSafe,
DicomTime: RefUnwindSafe,
impl Send for DataTokenwhere
SmallVec<[String; 2]>: Send,
RawVecInner: Send,
SmallVec<[Tag; 2]>: Send,
SmallVec<[u8; 2]>: Send,
SmallVec<[i16; 2]>: Send,
SmallVec<[u16; 2]>: Send,
SmallVec<[i32; 2]>: Send,
SmallVec<[u32; 2]>: Send,
SmallVec<[i64; 2]>: Send,
SmallVec<[u64; 2]>: Send,
SmallVec<[f32; 2]>: Send,
SmallVec<[f64; 2]>: Send,
SmallVec<[DicomDate; 2]>: Send,
SmallVec<[DicomDateTime; 2]>: Send,
SmallVec<[DicomTime; 2]>: Send,
impl Sync for DataTokenwhere
SmallVecData<[String; 2]>: Sync,
String: Sync,
RawVecInner: Sync,
SmallVecData<[Tag; 2]>: Sync,
Tag: Sync,
SmallVecData<[u8; 2]>: Sync,
u8: Sync,
SmallVecData<[i16; 2]>: Sync,
i16: Sync,
SmallVecData<[u16; 2]>: Sync,
u16: Sync,
SmallVecData<[i32; 2]>: Sync,
i32: Sync,
SmallVecData<[u32; 2]>: Sync,
u32: Sync,
SmallVecData<[i64; 2]>: Sync,
i64: Sync,
SmallVecData<[u64; 2]>: Sync,
u64: Sync,
SmallVecData<[f32; 2]>: Sync,
f32: Sync,
SmallVecData<[f64; 2]>: Sync,
f64: Sync,
SmallVecData<[DicomDate; 2]>: Sync,
DicomDate: Sync,
SmallVecData<[DicomDateTime; 2]>: Sync,
DicomDateTime: Sync,
SmallVecData<[DicomTime; 2]>: Sync,
DicomTime: Sync,
impl Unpin for DataTokenwhere
*const u8 is !null: Unpin,
*const String is !null: Unpin,
String: Unpin,
*const Tag is !null: Unpin,
Tag: Unpin,
u8: Unpin,
*const i16 is !null: Unpin,
i16: Unpin,
*const u16 is !null: Unpin,
u16: Unpin,
*const i32 is !null: Unpin,
i32: Unpin,
*const u32 is !null: Unpin,
u32: Unpin,
*const i64 is !null: Unpin,
i64: Unpin,
*const u64 is !null: Unpin,
u64: Unpin,
*const f32 is !null: Unpin,
f32: Unpin,
*const f64 is !null: Unpin,
f64: Unpin,
*const DicomDate is !null: Unpin,
DicomDate: Unpin,
*const DicomDateTime is !null: Unpin,
DicomDateTime: Unpin,
*const DicomTime is !null: Unpin,
DicomTime: Unpin,
impl UnsafeUnpin for DataTokenwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const String is !null: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
*const Tag is !null: UnsafeUnpin,
PhantomData<Tag>: UnsafeUnpin,
*const i16 is !null: UnsafeUnpin,
PhantomData<i16>: UnsafeUnpin,
*const u16 is !null: UnsafeUnpin,
PhantomData<u16>: UnsafeUnpin,
*const i32 is !null: UnsafeUnpin,
PhantomData<i32>: UnsafeUnpin,
*const u32 is !null: UnsafeUnpin,
PhantomData<u32>: UnsafeUnpin,
*const i64 is !null: UnsafeUnpin,
PhantomData<i64>: UnsafeUnpin,
*const u64 is !null: UnsafeUnpin,
PhantomData<u64>: UnsafeUnpin,
*const f32 is !null: UnsafeUnpin,
PhantomData<f32>: UnsafeUnpin,
*const f64 is !null: UnsafeUnpin,
PhantomData<f64>: UnsafeUnpin,
*const DicomDate is !null: UnsafeUnpin,
PhantomData<DicomDate>: UnsafeUnpin,
*const DicomDateTime is !null: UnsafeUnpin,
PhantomData<DicomDateTime>: UnsafeUnpin,
*const DicomTime is !null: UnsafeUnpin,
PhantomData<DicomTime>: UnsafeUnpin,
impl UnwindSafe for DataTokenwhere
RawVecInner: UnwindSafe,
NonNull<String>: UnwindSafe,
String: UnwindSafe,
NonNull<Tag>: UnwindSafe,
Tag: UnwindSafe,
NonNull<u8>: UnwindSafe,
u8: UnwindSafe,
NonNull<i16>: UnwindSafe,
i16: UnwindSafe,
NonNull<u16>: UnwindSafe,
u16: UnwindSafe,
NonNull<i32>: UnwindSafe,
i32: UnwindSafe,
NonNull<u32>: UnwindSafe,
u32: UnwindSafe,
NonNull<i64>: UnwindSafe,
i64: UnwindSafe,
NonNull<u64>: UnwindSafe,
u64: UnwindSafe,
NonNull<f32>: UnwindSafe,
f32: UnwindSafe,
NonNull<f64>: UnwindSafe,
f64: UnwindSafe,
NonNull<DicomDate>: UnwindSafe,
DicomDate: UnwindSafe,
NonNull<DicomDateTime>: UnwindSafe,
DicomDateTime: UnwindSafe,
NonNull<DicomTime>: UnwindSafe,
DicomTime: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more