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: AttributeSelector
the selector for the attribute to apply
action: AttributeAction
the 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§fn clone(&self) -> AttributeOp
fn clone(&self) -> AttributeOp
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§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 Freeze for AttributeOp
impl RefUnwindSafe for AttributeOp
impl Send for AttributeOp
impl Sync for AttributeOp
impl Unpin for AttributeOp
impl UnwindSafe for AttributeOp
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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