pub enum DICOMJsonTagValue {
Str(String),
Int(i32),
DICOMJson(DICOMJson),
Value(Value),
}
Variants§
Implementations§
Source§impl DICOMJsonTagValue
impl DICOMJsonTagValue
Sourcepub fn as_str_mut(&mut self) -> Option<&mut String>
pub fn as_str_mut(&mut self) -> Option<&mut String>
Optionally returns mutable references to the inner fields if this is a DICOMJsonTagValue::Str
, otherwise None
Sourcepub fn as_str(&self) -> Option<&String>
pub fn as_str(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a DICOMJsonTagValue::Str
, otherwise None
Sourcepub fn into_str(self) -> Result<String, Self>
pub fn into_str(self) -> Result<String, Self>
Returns the inner fields if this is a DICOMJsonTagValue::Str
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn as_int_mut(&mut self) -> Option<&mut i32>
pub fn as_int_mut(&mut self) -> Option<&mut i32>
Optionally returns mutable references to the inner fields if this is a DICOMJsonTagValue::Int
, otherwise None
Sourcepub fn as_int(&self) -> Option<&i32>
pub fn as_int(&self) -> Option<&i32>
Optionally returns references to the inner fields if this is a DICOMJsonTagValue::Int
, otherwise None
Sourcepub fn into_int(self) -> Result<i32, Self>
pub fn into_int(self) -> Result<i32, Self>
Returns the inner fields if this is a DICOMJsonTagValue::Int
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn as_dicom_json_mut(&mut self) -> Option<&mut DICOMJson>
pub fn as_dicom_json_mut(&mut self) -> Option<&mut DICOMJson>
Optionally returns mutable references to the inner fields if this is a DICOMJsonTagValue::DICOMJson
, otherwise None
Sourcepub fn as_dicom_json(&self) -> Option<&DICOMJson>
pub fn as_dicom_json(&self) -> Option<&DICOMJson>
Optionally returns references to the inner fields if this is a DICOMJsonTagValue::DICOMJson
, otherwise None
Sourcepub fn into_dicom_json(self) -> Result<DICOMJson, Self>
pub fn into_dicom_json(self) -> Result<DICOMJson, Self>
Returns the inner fields if this is a DICOMJsonTagValue::DICOMJson
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn as_value_mut(&mut self) -> Option<&mut Value>
pub fn as_value_mut(&mut self) -> Option<&mut Value>
Optionally returns mutable references to the inner fields if this is a DICOMJsonTagValue::Value
, otherwise None
Sourcepub fn as_value(&self) -> Option<&Value>
pub fn as_value(&self) -> Option<&Value>
Optionally returns references to the inner fields if this is a DICOMJsonTagValue::Value
, otherwise None
Sourcepub fn into_value(self) -> Result<Value, Self>
pub fn into_value(self) -> Result<Value, Self>
Returns the inner fields if this is a DICOMJsonTagValue::Value
, otherwise returns back the enum in the Err
case of the result
Trait Implementations§
Source§impl Debug for DICOMJsonTagValue
impl Debug for DICOMJsonTagValue
Source§impl<'de> Deserialize<'de> for DICOMJsonTagValue
impl<'de> Deserialize<'de> for DICOMJsonTagValue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for DICOMJsonTagValue
impl RefUnwindSafe for DICOMJsonTagValue
impl Send for DICOMJsonTagValue
impl Sync for DICOMJsonTagValue
impl Unpin for DICOMJsonTagValue
impl UnwindSafe for DICOMJsonTagValue
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> 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