[−][src]Struct dicom_core::value::CastValueError
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 str
The value format requested
got: ValueType
The value's actual representation
Trait Implementations
impl Clone for CastValueError
[src]
fn clone(&self) -> CastValueError
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for CastValueError
[src]
impl Display for CastValueError
[src]
impl Error for CastValueError
[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn description(&self) -> &str
1.0.0[src]
fn cause(&self) -> Option<&dyn Error>
1.0.0[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]
Auto Trait Implementations
impl RefUnwindSafe for CastValueError
impl Send for CastValueError
impl Sync for CastValueError
impl Unpin for CastValueError
impl UnwindSafe for CastValueError
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AsErrorSource for T where
T: 'static + Error,
[src]
T: 'static + Error,
fn as_error_source(&self) -> &(dyn Error + 'static)
[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> 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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,