pub struct CodecRegistry { /* private fields */ }Expand description
Registry of all available image codecs, keyed by transfer syntax UID.
Implementations§
Source§impl CodecRegistry
impl CodecRegistry
Sourcepub fn register(&self, codec: Arc<dyn ImageCodec>)
pub fn register(&self, codec: Arc<dyn ImageCodec>)
Register a codec (replaces any existing codec for the same UID).
Sourcepub fn find(&self, transfer_syntax_uid: &str) -> Option<Arc<dyn ImageCodec>>
pub fn find(&self, transfer_syntax_uid: &str) -> Option<Arc<dyn ImageCodec>>
Look up a codec that supports both decoding and encoding for a transfer syntax UID.
Sourcepub fn find_decoder(
&self,
transfer_syntax_uid: &str,
) -> Option<Arc<dyn ImageCodec>>
pub fn find_decoder( &self, transfer_syntax_uid: &str, ) -> Option<Arc<dyn ImageCodec>>
Look up a decoder by transfer syntax UID.
Sourcepub fn find_encoder(
&self,
transfer_syntax_uid: &str,
) -> Option<Arc<dyn ImageCodec>>
pub fn find_encoder( &self, transfer_syntax_uid: &str, ) -> Option<Arc<dyn ImageCodec>>
Look up an encoder by transfer syntax UID.
Sourcepub fn find_required(
&self,
transfer_syntax_uid: &str,
) -> DcmResult<Arc<dyn ImageCodec>>
pub fn find_required( &self, transfer_syntax_uid: &str, ) -> DcmResult<Arc<dyn ImageCodec>>
Look up a codec that supports both decoding and encoding or return a
DcmError::NoCodec error.
Sourcepub fn find_decoder_required(
&self,
transfer_syntax_uid: &str,
) -> DcmResult<Arc<dyn ImageCodec>>
pub fn find_decoder_required( &self, transfer_syntax_uid: &str, ) -> DcmResult<Arc<dyn ImageCodec>>
Look up a decoder or return a DcmError::NoCodec error.
Sourcepub fn find_encoder_required(
&self,
transfer_syntax_uid: &str,
) -> DcmResult<Arc<dyn ImageCodec>>
pub fn find_encoder_required( &self, transfer_syntax_uid: &str, ) -> DcmResult<Arc<dyn ImageCodec>>
Look up an encoder or return a DcmError::NoCodec error.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for CodecRegistry
impl RefUnwindSafe for CodecRegistry
impl Send for CodecRegistry
impl Sync for CodecRegistry
impl Unpin for CodecRegistry
impl UnsafeUnpin for CodecRegistry
impl UnwindSafe for CodecRegistry
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
Mutably borrows from an owned value. Read more
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>
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 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>
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