pub struct UidRoot(/* private fields */);
Expand description
The UidRoot
struct represents a DICOM UID root that can be used as prefix for
generating new UIDs during de-identification.
The UidRoot
must follow DICOM UID format rules:
- Start with a digit 1-9
- Contain only numbers and dots
It also must not have more than 32 characters.
§Example
use dicom_anonymization::config::UidRoot;
// Create a valid UID root
let uid_root = "1.2.840.123".parse::<UidRoot>().unwrap();
// Invalid UID root (not starting with 1-9)
let invalid = "0.1.2".parse::<UidRoot>();
assert!(invalid.is_err());
Implementations§
Trait Implementations§
Source§impl Ord for UidRoot
impl Ord for UidRoot
Source§impl PartialOrd for UidRoot
impl PartialOrd for UidRoot
impl Eq for UidRoot
impl StructuralPartialEq for UidRoot
Auto Trait Implementations§
impl Freeze for UidRoot
impl RefUnwindSafe for UidRoot
impl Send for UidRoot
impl Sync for UidRoot
impl Unpin for UidRoot
impl UnwindSafe for UidRoot
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