pub struct AnonymizationResult {
pub original: DefaultDicomObject,
pub anonymized: DefaultDicomObject,
}
Expand description
Represents the result of a DICOM anonymization process.
This struct contains both the original and anonymized DICOM objects after processing. It allows access to both versions for comparison or verification purposes.
§Fields
original
- The original, unmodified DICOM object before anonymizationanonymized
- The resulting DICOM object after anonymization
Fields§
§original: DefaultDicomObject
§anonymized: DefaultDicomObject
Implementations§
Source§impl AnonymizationResult
impl AnonymizationResult
Sourcepub fn write<W: Write>(&self, to: W) -> Result<()>
pub fn write<W: Write>(&self, to: W) -> Result<()>
Writes the anonymized DICOM object to the provided writer.
§Arguments
to
- A writer implementing theWrite
trait where the anonymized DICOM object will be written to.
§Returns
Returns a Result<()>
indicating success or an error if the write operation fails.
§Example
use std::fs::File;
use dicom_anonymization::Anonymizer;
let anonymizer = Anonymizer::default();
let file = File::open("tests/data/test.dcm").unwrap();
let result = anonymizer.anonymize(file).unwrap();
// output can be a file or anything else that implements the `Write` trait
let mut output = Vec::new();
result.write(&mut output).unwrap();
Trait Implementations§
Source§impl Clone for AnonymizationResult
impl Clone for AnonymizationResult
Source§fn clone(&self) -> AnonymizationResult
fn clone(&self) -> AnonymizationResult
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AnonymizationResult
impl Debug for AnonymizationResult
Source§impl PartialEq for AnonymizationResult
impl PartialEq for AnonymizationResult
impl StructuralPartialEq for AnonymizationResult
Auto Trait Implementations§
impl Freeze for AnonymizationResult
impl RefUnwindSafe for AnonymizationResult
impl Send for AnonymizationResult
impl Sync for AnonymizationResult
impl Unpin for AnonymizationResult
impl UnwindSafe for AnonymizationResult
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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