Enum dicom_core::value::ValueType

source ·
pub enum ValueType {
Show 18 variants Empty, DataSetSequence, PixelSequence, Strs, Str, Tags, U8, I16, U16, I32, U32, I64, U64, F32, F64, Date, DateTime, Time,
}
Expand description

An enum representing an abstraction of a DICOM element’s data value type. This should be the equivalent of PrimitiveValue without the content, plus the DataSetSequence and PixelSequence entries.

Variants§

§

Empty

No data. Used for any value of length 0.

§

DataSetSequence

A data set sequence. Used for values with the SQ representation when not empty.

§

PixelSequence

An item. Used for the values of encapsulated pixel data.

§

Strs

A sequence of strings. Used for AE, AS, PN, SH, CS, LO, UI and UC. Can also be used for IS, SS, DS, DA, DT and TM when decoding with format preservation.

§

Str

A single string. Used for ST, LT, UT and UR, which are never multi-valued.

§

Tags

A sequence of attribute tags. Used specifically for AT.

§

U8

The value is a sequence of unsigned 8-bit integers. Used for OB and UN.

§

I16

The value is a sequence of signed 16-bit integers. Used for SS.

§

U16

A sequence of unsigned 16-bit integers. Used for US and OW.

§

I32

A sequence of signed 32-bit integers. Used for SL and IS.

§

U32

A sequence of unsigned 32-bit integers. Used for UL and OL.

§

I64

A sequence of signed 64-bit integers. Used for SV.

§

U64

A sequence of unsigned 64-bit integers. Used for UV and OV.

§

F32

The value is a sequence of 32-bit floating point numbers. Used for OF and FL.

§

F64

The value is a sequence of 64-bit floating point numbers. Used for OD, FD and DS.

§

Date

A sequence of dates. Used for the DA representation.

§

DateTime

A sequence of date-time values. Used for the DT representation.

§

Time

A sequence of time values. Used for the TM representation.

Trait Implementations§

source§

impl Clone for ValueType

source§

fn clone(&self) -> ValueType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ValueType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for ValueType

source§

fn eq(&self, other: &ValueType) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for ValueType

source§

impl Eq for ValueType

source§

impl StructuralPartialEq for ValueType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.