Struct dicom_core::value::CastValueError [−][src]
An error type for an attempt of accessing a value in one internal representation as another.
This error is raised whenever it is not possible to retrieve the requested value, either because the inner representation is not compatible with the requested value type, or a conversion would be required. In other words, if a reference to the inner value cannot be obtained with the requested target type (for example, retrieving a date from a string), an error of this type is returned.
If such a conversion is acceptable, please use conversion methods instead:
to_date instead of date, to_str instead of string, and so on.
The error type would then be ConvertValueError.
Fields
requested: &'static strThe value format requested
got: ValueTypeThe value’s actual representation
Trait Implementations
impl Clone for CastValueError[src]
impl Clone for CastValueError[src]fn clone(&self) -> CastValueError[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Error for CastValueError[src]
impl Error for CastValueError[src]impl PartialEq<CastValueError> for CastValueError[src]
impl PartialEq<CastValueError> for CastValueError[src]fn eq(&self, other: &CastValueError) -> bool[src]
fn ne(&self, other: &CastValueError) -> bool[src]
impl StructuralPartialEq for CastValueError[src]
impl StructuralPartialEq for CastValueError[src]Auto Trait Implementations
impl RefUnwindSafe for CastValueError
impl RefUnwindSafe for CastValueErrorimpl Send for CastValueError
impl Send for CastValueErrorimpl Sync for CastValueError
impl Sync for CastValueErrorimpl Unpin for CastValueError
impl Unpin for CastValueErrorimpl UnwindSafe for CastValueError
impl UnwindSafe for CastValueError