pub struct LazyDataSetReader<S> { /* private fields */ }Expand description
An attached iterator for retrieving DICOM object element markers from a random access data source.
This iterator produces data tokens without eagerly reading the bytes of a value.
Implementations§
Source§impl<R> LazyDataSetReader<DynStatefulDecoder<R>>
impl<R> LazyDataSetReader<DynStatefulDecoder<R>>
Sourcepub fn new_with_ts(source: R, ts: &TransferSyntax) -> Result<Self>where
R: ReadSeek,
pub fn new_with_ts(source: R, ts: &TransferSyntax) -> Result<Self>where
R: ReadSeek,
Create a new lazy data set reader expecting the given transfer syntax that reads from the given random access source.
Sourcepub fn new_with_ts_cs(
source: R,
ts: &TransferSyntax,
cs: SpecificCharacterSet,
) -> Result<Self>where
R: ReadSeek,
pub fn new_with_ts_cs(
source: R,
ts: &TransferSyntax,
cs: SpecificCharacterSet,
) -> Result<Self>where
R: ReadSeek,
Create a new lazy data set reader with the given random access source and element dictionary, while considering the given transfer syntax and specific character set.
Sourcepub fn new_with_ts_options(
source: R,
ts: &TransferSyntax,
options: LazyDataSetReaderOptions,
) -> Result<Self>where
R: ReadSeek,
pub fn new_with_ts_options(
source: R,
ts: &TransferSyntax,
options: LazyDataSetReaderOptions,
) -> Result<Self>where
R: ReadSeek,
Create a new lazy data set reader expecting the given transfer syntax that reads from the given random access source, with extra parsing options.
Sourcepub fn new_with_ts_cs_options(
source: R,
ts: &TransferSyntax,
cs: SpecificCharacterSet,
options: LazyDataSetReaderOptions,
) -> Result<Self>where
R: ReadSeek,
pub fn new_with_ts_cs_options(
source: R,
ts: &TransferSyntax,
cs: SpecificCharacterSet,
options: LazyDataSetReaderOptions,
) -> Result<Self>where
R: ReadSeek,
Create a new lazy data set reader with the given random access source and element dictionary, while considering the given transfer syntax and specific character set.
Source§impl<S> LazyDataSetReader<S>where
S: StatefulDecode,
impl<S> LazyDataSetReader<S>where
S: StatefulDecode,
Sourcepub fn new_with_options(parser: S, options: LazyDataSetReaderOptions) -> Selfwhere
S: StatefulDecode,
pub fn new_with_options(parser: S, options: LazyDataSetReaderOptions) -> Selfwhere
S: StatefulDecode,
Create a new lazy data set reader using the given stateful decoder, with extra parsing options.
Source§impl<S> LazyDataSetReader<S>where
S: StatefulDecode,
impl<S> LazyDataSetReader<S>where
S: StatefulDecode,
Sourcepub fn into_decoder(self) -> S
pub fn into_decoder(self) -> S
Retrieve the inner stateful decoder from this data set reader.
Sourcepub fn advance(&mut self) -> Option<Result<LazyDataToken<&mut S>>>
pub fn advance(&mut self) -> Option<Result<LazyDataToken<&mut S>>>
Advance and retrieve the next DICOM data token.
Note: For the data set to be successfully parsed, the resulting data tokens needs to be consumed if they are of a value type.
Sourcepub fn peek(&mut self) -> Result<Option<&DataToken>>
pub fn peek(&mut self) -> Result<Option<&DataToken>>
Peek the next token from the source by
reading a new token in the first call.
Subsequent calls to peek will return the same token
until another consumer method is called.
Peeking only works in a data or item element boundary, so the returned data token is either an element header or an item header. At the moment, a failed peek will result in a hard break, preventing further iteration.
Trait Implementations§
Auto Trait Implementations§
impl<S> Forget for LazyDataSetReader<S>
impl<S> Freeze for LazyDataSetReader<S>where
S: Freeze,
*const u8 is !null: Freeze,
PhantomData<SeqToken>: Freeze,
PhantomData<u8>: Freeze,
*const String is !null: Freeze,
PhantomData<String>: Freeze,
*const Tag is !null: Freeze,
PhantomData<Tag>: Freeze,
*const i16 is !null: Freeze,
PhantomData<i16>: Freeze,
*const u16 is !null: Freeze,
PhantomData<u16>: Freeze,
*const i32 is !null: Freeze,
PhantomData<i32>: Freeze,
*const u32 is !null: Freeze,
PhantomData<u32>: Freeze,
*const i64 is !null: Freeze,
PhantomData<i64>: Freeze,
*const u64 is !null: Freeze,
PhantomData<u64>: Freeze,
*const f32 is !null: Freeze,
PhantomData<f32>: Freeze,
*const f64 is !null: Freeze,
PhantomData<f64>: Freeze,
*const DicomDate is !null: Freeze,
PhantomData<DicomDate>: Freeze,
*const DicomDateTime is !null: Freeze,
PhantomData<DicomDateTime>: Freeze,
*const DicomTime is !null: Freeze,
PhantomData<DicomTime>: Freeze,
impl<S> Move for LazyDataSetReader<S>
impl<S> RefUnwindSafe for LazyDataSetReader<S>where
S: RefUnwindSafe,
String: RefUnwindSafe,
Tag: RefUnwindSafe,
u8: RefUnwindSafe,
i16: RefUnwindSafe,
u16: RefUnwindSafe,
i32: RefUnwindSafe,
u32: RefUnwindSafe,
i64: RefUnwindSafe,
u64: RefUnwindSafe,
f32: RefUnwindSafe,
f64: RefUnwindSafe,
DicomDate: RefUnwindSafe,
DicomDateTime: RefUnwindSafe,
DicomTime: RefUnwindSafe,
impl<S> Send for LazyDataSetReader<S>where
S: Send,
RawVecInner: Send,
SmallVec<[String; 2]>: Send,
SmallVec<[Tag; 2]>: Send,
SmallVec<[u8; 2]>: Send,
SmallVec<[i16; 2]>: Send,
SmallVec<[u16; 2]>: Send,
SmallVec<[i32; 2]>: Send,
SmallVec<[u32; 2]>: Send,
SmallVec<[i64; 2]>: Send,
SmallVec<[u64; 2]>: Send,
SmallVec<[f32; 2]>: Send,
SmallVec<[f64; 2]>: Send,
SmallVec<[DicomDate; 2]>: Send,
SmallVec<[DicomDateTime; 2]>: Send,
SmallVec<[DicomTime; 2]>: Send,
impl<S> Sync for LazyDataSetReader<S>where
S: Sync,
RawVecInner: Sync,
SmallVecData<[String; 2]>: Sync,
String: Sync,
SmallVecData<[Tag; 2]>: Sync,
Tag: Sync,
SmallVecData<[u8; 2]>: Sync,
u8: Sync,
SmallVecData<[i16; 2]>: Sync,
i16: Sync,
SmallVecData<[u16; 2]>: Sync,
u16: Sync,
SmallVecData<[i32; 2]>: Sync,
i32: Sync,
SmallVecData<[u32; 2]>: Sync,
u32: Sync,
SmallVecData<[i64; 2]>: Sync,
i64: Sync,
SmallVecData<[u64; 2]>: Sync,
u64: Sync,
SmallVecData<[f32; 2]>: Sync,
f32: Sync,
SmallVecData<[f64; 2]>: Sync,
f64: Sync,
SmallVecData<[DicomDate; 2]>: Sync,
DicomDate: Sync,
SmallVecData<[DicomDateTime; 2]>: Sync,
DicomDateTime: Sync,
SmallVecData<[DicomTime; 2]>: Sync,
DicomTime: Sync,
impl<S> Unpin for LazyDataSetReader<S>where
S: Unpin,
*const u8 is !null: Unpin,
*const String is !null: Unpin,
String: Unpin,
*const Tag is !null: Unpin,
Tag: Unpin,
u8: Unpin,
*const i16 is !null: Unpin,
i16: Unpin,
*const u16 is !null: Unpin,
u16: Unpin,
*const i32 is !null: Unpin,
i32: Unpin,
*const u32 is !null: Unpin,
u32: Unpin,
*const i64 is !null: Unpin,
i64: Unpin,
*const u64 is !null: Unpin,
u64: Unpin,
*const f32 is !null: Unpin,
f32: Unpin,
*const f64 is !null: Unpin,
f64: Unpin,
*const DicomDate is !null: Unpin,
DicomDate: Unpin,
*const DicomDateTime is !null: Unpin,
DicomDateTime: Unpin,
*const DicomTime is !null: Unpin,
DicomTime: Unpin,
impl<S> UnsafeUnpin for LazyDataSetReader<S>where
S: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<SeqToken>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const String is !null: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
*const Tag is !null: UnsafeUnpin,
PhantomData<Tag>: UnsafeUnpin,
*const i16 is !null: UnsafeUnpin,
PhantomData<i16>: UnsafeUnpin,
*const u16 is !null: UnsafeUnpin,
PhantomData<u16>: UnsafeUnpin,
*const i32 is !null: UnsafeUnpin,
PhantomData<i32>: UnsafeUnpin,
*const u32 is !null: UnsafeUnpin,
PhantomData<u32>: UnsafeUnpin,
*const i64 is !null: UnsafeUnpin,
PhantomData<i64>: UnsafeUnpin,
*const u64 is !null: UnsafeUnpin,
PhantomData<u64>: UnsafeUnpin,
*const f32 is !null: UnsafeUnpin,
PhantomData<f32>: UnsafeUnpin,
*const f64 is !null: UnsafeUnpin,
PhantomData<f64>: UnsafeUnpin,
*const DicomDate is !null: UnsafeUnpin,
PhantomData<DicomDate>: UnsafeUnpin,
*const DicomDateTime is !null: UnsafeUnpin,
PhantomData<DicomDateTime>: UnsafeUnpin,
*const DicomTime is !null: UnsafeUnpin,
PhantomData<DicomTime>: UnsafeUnpin,
impl<S> UnwindSafe for LazyDataSetReader<S>where
S: UnwindSafe,
RawVecInner: UnwindSafe,
NonNull<String>: UnwindSafe,
String: UnwindSafe,
NonNull<Tag>: UnwindSafe,
Tag: UnwindSafe,
NonNull<u8>: UnwindSafe,
u8: UnwindSafe,
NonNull<i16>: UnwindSafe,
i16: UnwindSafe,
NonNull<u16>: UnwindSafe,
u16: UnwindSafe,
NonNull<i32>: UnwindSafe,
i32: UnwindSafe,
NonNull<u32>: UnwindSafe,
u32: UnwindSafe,
NonNull<i64>: UnwindSafe,
i64: UnwindSafe,
NonNull<u64>: UnwindSafe,
u64: UnwindSafe,
NonNull<f32>: UnwindSafe,
f32: UnwindSafe,
NonNull<f64>: UnwindSafe,
f64: UnwindSafe,
NonNull<DicomDate>: UnwindSafe,
DicomDate: UnwindSafe,
NonNull<DicomDateTime>: UnwindSafe,
DicomDateTime: UnwindSafe,
NonNull<DicomTime>: UnwindSafe,
DicomTime: UnwindSafe,
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> 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