[][src]Trait dicom_encoding::encode::Encode

pub trait Encode {
    type Writer: ?Sized + Write;
    fn encode_tag(&self, to: &mut Self::Writer, tag: Tag) -> Result<()>;
fn encode_element_header(
        &self,
        to: &mut Self::Writer,
        de: DataElementHeader
    ) -> Result<usize>;
fn encode_item_header(&self, to: &mut Self::Writer, len: u32) -> Result<()>; fn encode_item_delimiter(&self, to: &mut Self::Writer) -> Result<()> { ... }
fn encode_sequence_delimiter(&self, to: &mut Self::Writer) -> Result<()> { ... } }

Type trait for a data element encoder.

Associated Types

type Writer: ?Sized + Write

The target of the encoded data.

Loading content...

Required methods

fn encode_tag(&self, to: &mut Self::Writer, tag: Tag) -> Result<()>

Encode and write an element tag.

fn encode_element_header(
    &self,
    to: &mut Self::Writer,
    de: DataElementHeader
) -> Result<usize>

Encode and write a data element header to the given destination. Returns the number of bytes effectively written on success.

fn encode_item_header(&self, to: &mut Self::Writer, len: u32) -> Result<()>

Encode and write a DICOM sequence item header to the given destination.

Loading content...

Provided methods

fn encode_item_delimiter(&self, to: &mut Self::Writer) -> Result<()>

Encode and write a DICOM sequence item delimiter to the given destination.

fn encode_sequence_delimiter(&self, to: &mut Self::Writer) -> Result<()>

Encode and write a DICOM sequence delimiter to the given destination.

Loading content...

Implementors

impl<W: ?Sized> Encode for ExplicitVRBigEndianEncoder<W> where
    W: Write
[src]

type Writer = W

impl<W: ?Sized> Encode for ExplicitVRLittleEndianEncoder<W> where
    W: Write
[src]

type Writer = W

impl<W: ?Sized> Encode for ImplicitVRLittleEndianEncoder<W> where
    W: Write
[src]

type Writer = W

Loading content...