Struct dicom_core::ops::AttributeOp  
source · 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§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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
 
default 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