pub trait ApplyOp {
type Err: Error + 'static;
// Required method
fn apply(&mut self, op: AttributeOp) -> Result<(), Self::Err>;
}
Expand description
Trait for applying DICOM attribute operations.
This is typically implemented by DICOM objects and other data set types to serve as a common API for attribute manipulation.
Required Associated Types§
Required Methods§
Sourcefn apply(&mut self, op: AttributeOp) -> Result<(), Self::Err>
fn apply(&mut self, op: AttributeOp) -> Result<(), Self::Err>
Apply the given attribute operation on the receiving object.
Effects may slightly differ between implementations,
but should always be compliant with
the expectations defined in AttributeAction
variants.
If the action to apply is unsupported, or not possible for other reasons, an error is returned and no changes to the receiver are made. While not all kinds of operations may be possible, generic DICOM data set holders will usually support all actions. See the respective documentation of the implementing type for more details.