dicom_encoding::transfer_syntax

Trait DataRWAdapter

Source
pub trait DataRWAdapter<R, W> {
    type Reader: Read;
    type Writer: Write;

    // Required methods
    fn adapt_reader(&self, reader: R) -> Self::Reader
       where R: Read;
    fn adapt_writer(&self, writer: W) -> Self::Writer
       where W: Write;
}
Expand description

An adapter of byte read and write streams.

Required Associated Types§

Source

type Reader: Read

The type of the adapted reader.

Source

type Writer: Write

The type of the adapted writer.

Required Methods§

Source

fn adapt_reader(&self, reader: R) -> Self::Reader
where R: Read,

Adapt a byte reader.

Source

fn adapt_writer(&self, writer: W) -> Self::Writer
where W: Write,

Adapt a byte writer.

Implementations on Foreign Types§

Source§

impl<T, R, W> DataRWAdapter<R, W> for &T
where T: DataRWAdapter<R, W>, R: Read, W: Write,

Source§

fn adapt_reader(&self, reader: R) -> Self::Reader
where R: Read,

Adapt a byte reader.

Source§

fn adapt_writer(&self, writer: W) -> Self::Writer
where W: Write,

Adapt a byte writer.

Source§

type Reader = <T as DataRWAdapter<R, W>>::Reader

Source§

type Writer = <T as DataRWAdapter<R, W>>::Writer

Implementors§