pub enum ValueReadStrategy {
Interpreted,
Preserved,
Raw,
}
Expand description
The value reading strategy for the data set reader.
It defines how the PrimitiveValue
s in value tokens are constructed.
Variants§
Interpreted
Textual values will be decoded according to their value representation.
Word-sized binary values are read according to the expected byte order. Dates, times, and date-times (DA, DT, TM) are parsed into their more specific variants, leading to parser failure if they are not valid DICOM. String numbers (IS, FD) are also converted into binary representations. For the case of floats, this may introduce precision errors.
Preserved
Values will be stored without decoding dates or textual numbers.
Word-sized binary values are read according to the expected byte order. Date-time values and numbers are kept in their original string representation as string objects. All text is still decoded into Rust string values, in accordance to the standard, unless its value representation is unknown to the decoder.
This is the default strategy.
Raw
All primitive values are fetched as raw byte buffers, without any form of decoding or interpretation. Not even byte order conversions are made.
This strategy is not recommended, as it makes the retrieval of important textual data more difficult.
Trait Implementations§
Source§impl Clone for ValueReadStrategy
impl Clone for ValueReadStrategy
Source§fn clone(&self) -> ValueReadStrategy
fn clone(&self) -> ValueReadStrategy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ValueReadStrategy
impl Debug for ValueReadStrategy
Source§impl Default for ValueReadStrategy
impl Default for ValueReadStrategy
Source§fn default() -> ValueReadStrategy
fn default() -> ValueReadStrategy
Source§impl Hash for ValueReadStrategy
impl Hash for ValueReadStrategy
Source§impl PartialEq for ValueReadStrategy
impl PartialEq for ValueReadStrategy
impl Copy for ValueReadStrategy
impl Eq for ValueReadStrategy
impl StructuralPartialEq for ValueReadStrategy
Auto Trait Implementations§
impl Freeze for ValueReadStrategy
impl RefUnwindSafe for ValueReadStrategy
impl Send for ValueReadStrategy
impl Sync for ValueReadStrategy
impl Unpin for ValueReadStrategy
impl UnwindSafe for ValueReadStrategy
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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