pub struct AttributeOp {
pub selector: AttributeSelector,
pub action: AttributeAction,
}Expand description
Descriptor for a single operation to apply over a DICOM data set.
This type is purely descriptive. It outlines a non-exhaustive set of possible changes around an attribute, as well as set some expectations regarding the outcome of certain actions against the attribute’s previous state.
The operations themselves are provided
alongside DICOM object or DICOM data set implementations,
such as the InMemDicomObject from the dicom_object crate.
Attribute operations can only select shallow attributes, but the operation may be implemented when applied against nested data sets.
Fields§
§selector: AttributeSelectorthe selector for the attribute to apply
action: AttributeActionthe effective action to apply
Implementations§
Source§impl AttributeOp
impl AttributeOp
Sourcepub fn new(
selector: impl Into<AttributeSelector>,
action: AttributeAction,
) -> Self
pub fn new( selector: impl Into<AttributeSelector>, action: AttributeAction, ) -> Self
Construct an attribute operation.
This constructor function may be easier to use
than writing a public struct expression directly,
due to its automatic conversion of selector.
§Example
let op = AttributeOp::new(
// ImageType
Tag(0x0008, 0x0008),
AttributeAction::SetStr("DERIVED\\SECONDARY\\DOSE_INFO".into()),
);Trait Implementations§
Source§impl Clone for AttributeOp
impl Clone for AttributeOp
Source§impl Debug for AttributeOp
impl Debug for AttributeOp
Source§impl PartialEq for AttributeOp
impl PartialEq for AttributeOp
impl StructuralPartialEq for AttributeOp
Auto Trait Implementations§
impl Forget for AttributeOp
impl Freeze for AttributeOpwhere
*const AttributeSelectorStep is !null: Freeze,
PhantomData<AttributeSelectorStep>: Freeze,
*const u8 is !null: 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,
&'static str: Freeze,
String: Freeze,
impl Move for AttributeOp
impl RefUnwindSafe for AttributeOpwhere
AttributeSelectorStep: 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 Send for AttributeOpwhere
SmallVec<[AttributeSelectorStep; 2]>: Send,
SmallVec<[String; 2]>: Send,
RawVecInner: 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,
&'static str: Send,
String: Send,
impl Sync for AttributeOpwhere
SmallVecData<[AttributeSelectorStep; 2]>: Sync,
AttributeSelectorStep: Sync,
SmallVecData<[String; 2]>: Sync,
String: Sync,
RawVecInner: 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 Unpin for AttributeOpwhere
*const AttributeSelectorStep is !null: Unpin,
AttributeSelectorStep: 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,
&'static str: Unpin,
impl UnsafeUnpin for AttributeOpwhere
*const AttributeSelectorStep is !null: UnsafeUnpin,
PhantomData<AttributeSelectorStep>: UnsafeUnpin,
*const u8 is !null: 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,
&'static str: UnsafeUnpin,
String: UnsafeUnpin,
impl UnwindSafe for AttributeOpwhere
NonNull<AttributeSelectorStep>: UnwindSafe,
AttributeSelectorStep: 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,
&'static str: 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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