[−][src]Enum dicom_core::value::Value
Representation of a full DICOM value, which may be either primitive or another DICOM object.
Variants
Primitive(PrimitiveValue)Primitive value
SequenceA complex sequence of items
Fields of Sequence
Methods
impl<I> Value<I> where
I: DicomValueType, [src]
I: DicomValueType,
pub fn multiplicity(&self) -> u32[src]
Obtain the number of individual values. In a sequence item, this is the number of items.
pub fn primitive(&self) -> Option<&PrimitiveValue>[src]
Gets a reference to the primitive value.
pub fn item(&self) -> Option<&[I]>[src]
Gets a reference to the items.
pub fn into_primitive(self) -> Option<PrimitiveValue>[src]
Retrieves the primitive value.
pub fn into_item(self) -> Option<C<I>>[src]
Retrieves the items.
pub fn to_str(&self) -> Result<Cow<str>, CastValueError>[src]
Retrieves the primitive value as a single string.
If the value contains multiple strings, they are concatenated
(separated by '\\') into an owned string.
pub fn as_u8(&self) -> Result<&[u8], CastValueError>[src]
Retrieves the primitive value as a sequence of unsigned bytes.
pub fn as_i32(&self) -> Result<&[i32], CastValueError>[src]
Retrieves the primitive value as a sequence of signed 32-bit integers.
pub fn to_tag(&self) -> Result<Tag, CastValueError>[src]
Retrieves the primitive value as a DICOM tag.
pub fn as_tags(&self) -> Result<&[Tag], CastValueError>[src]
Retrieves the primitive value as a sequence of DICOM tags.
Trait Implementations
impl<I> DicomValueType for Value<I> where
I: DicomValueType, [src]
I: DicomValueType,
fn value_type(&self) -> ValueType[src]
fn size(&self) -> Length[src]
fn is_empty(&self) -> bool[src]
Check whether the value is empty (0 length).
impl<I> From<PrimitiveValue> for Value<I>[src]
fn from(v: PrimitiveValue) -> Self[src]
impl<I: PartialEq> PartialEq<Value<I>> for Value<I>[src]
impl<I: Clone> Clone for Value<I>[src]
fn clone(&self) -> Value<I>[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl<I: Debug> Debug for Value<I>[src]
Auto Trait Implementations
impl<I> Send for Value<I> where
I: Send,
I: Send,
impl<I> Unpin for Value<I> where
I: Unpin,
I: Unpin,
impl<I> Sync for Value<I> where
I: Sync,
I: Sync,
impl<I> UnwindSafe for Value<I> where
I: RefUnwindSafe + UnwindSafe,
I: RefUnwindSafe + UnwindSafe,
impl<I> RefUnwindSafe for Value<I> where
I: RefUnwindSafe,
I: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,