Enum dicom_encoding::transfer_syntax::Codec  
source · pub enum Codec<D, R, W> {
    None,
    EncapsulatedPixelData(Option<R>, Option<W>),
    Dataset(Option<D>),
}Expand description
A description and possible implementation regarding the encoding and decoding requirements of a transfer syntax. This is also used as a means to describe whether pixel data is encapsulated and whether this implementation supports decoding and/or encoding it.
§Type parameters
Dshould implementDataRWAdapterand defines how one should read and write DICOM data sets, such as in the case for deflated data. When no special considerations for data set reading and writing are necessary, this can be set toNeverAdapter.Rshould implementPixelDataReader, and enables programs to convert encapsulated pixel data fragments into native pixel data.Wshould implementPixelDataWriter, and enables programs to convert native pixel data into encapsulated pixel data.
Variants§
None
No codec is required for this transfer syntax.
Pixel data, if any, should be in its native, unencapsulated format.
EncapsulatedPixelData(Option<R>, Option<W>)
Pixel data for this transfer syntax is encapsulated and likely subjected to a specific encoding process. The first part of the tuple struct contains the pixel data decoder, whereas the second item is for the pixel data encoder.
Decoding of the pixel data is not supported
if the decoder is None.
In this case, the program should still be able to
parse DICOM data sets
and fetch the pixel data in its encapsulated form.
Dataset(Option<D>)
A custom data set codec is required for reading and writing data sets.
If the item in the tuple struct is None,
then no reading and writing whatsoever is supported.
This could be used by a stub of
Deflated Explicit VR Little Endian, for example.
Trait Implementations§
impl<D, R, W> StructuralPartialEq for Codec<D, R, W>
Auto Trait Implementations§
impl<D, R, W> Freeze for Codec<D, R, W>
impl<D, R, W> RefUnwindSafe for Codec<D, R, W>
impl<D, R, W> Send for Codec<D, R, W>
impl<D, R, W> Sync for Codec<D, R, W>
impl<D, R, W> Unpin for Codec<D, R, W>
impl<D, R, W> UnwindSafe for Codec<D, R, W>
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
 
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)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