[−][src]Enum dicom_core::PrimitiveValue
An enum representing a primitive value from a DICOM element. The result of decoding an element's data value may be one of the enumerated types depending on its content and value representation.
Multiple elements are contained in a smallvec
vector,
conveniently aliased to the type C
.
See the macro dicom_value!
for a more intuitive means
of constructing these values.
Alternatively, From
conversions into PrimitiveValue
exist
for single element types,
including numeric types, String
, and &str
.
Example
let value = PrimitiveValue::from("Smith^John"); assert_eq!(value, PrimitiveValue::Str("Smith^John".to_string())); assert_eq!(value.multiplicity(), 1); let value = PrimitiveValue::from(512_u16); assert_eq!(value, PrimitiveValue::U16(smallvec![512]));
Variants
No data. Usually employed for zero-lengthed values.
A sequence of strings. Used for AE, AS, PN, SH, CS, LO, UI and UC. Can also be used for IS, SS, DS, DA, DT and TM when decoding with format preservation.
Str(String)
A single string. Used for ST, LT, UT and UR, which are never multi-valued.
A sequence of attribute tags. Used specifically for AT.
The value is a sequence of unsigned 16-bit integers. Used for OB and UN.
The value is a sequence of signed 16-bit integers. Used for SS.
A sequence of unsigned 168-bit integers. Used for US and OW.
A sequence of signed 32-bit integers. Used for SL and IS.
A sequence of unsigned 32-bit integers. Used for UL and OL.
A sequence of signed 64-bit integers. Used for SV.
A sequence of unsigned 64-bit integers. Used for UV and OV.
The value is a sequence of 32-bit floating point numbers. Used for OF and FL.
The value is a sequence of 64-bit floating point numbers. Used for OD and FD, DS.
A sequence of complete dates. Used for the DA representation.
DateTime(SmallVec<[DateTime<FixedOffset>; 2]>)
A sequence of complete date-time values. Used for the DT representation.
A sequence of complete time values. Used for the TM representation.
Implementations
impl PrimitiveValue
[src]
pub fn new_u16(value: u16) -> Self
[src]
Create a single unsigned 16-bit value.
pub fn new_u32(value: u32) -> Self
[src]
Create a single unsigned 32-bit value.
pub fn new_i32(value: u32) -> Self
[src]
Create a single I32 value.
pub fn multiplicity(&self) -> u32
[src]
Obtain the number of individual elements. This number may not match the DICOM value multiplicity in some value representations.
pub fn calculate_byte_len(&self) -> usize
[src]
Determine the length of the DICOM value in its encoded form.
In other words, this is the number of bytes that the value would need to occupy in a DICOM file, without compression and without the element header. The output is always an even number, so as to consider the mandatory trailing padding.
This method is particularly useful for presenting an estimated space occupation to the end user. However, consumers should not depend on this number for decoding or encoding values. The calculated number does not need to match the length of the original byte stream from where the value was originally decoded.
pub fn to_str(&self) -> Cow<'_, str>
[src]
Convert the primitive value into a string representation.
String values already encoded with the Str
and Strs
variants
are provided as is.
In the case of Strs
, the strings are first joined together
with a backslash ('\\'
).
All other type variants are first converted to a string,
then joined together with a backslash.
Note:
As the process of reading a DICOM value
may not always preserve its original nature,
it is not guaranteed that to_str()
returns a string with
the exact same byte sequence as the one originally found
at the source of the value,
even for the string variants.
Therefore, this method is not reliable
for compliant DICOM serialization.
Examples
assert_eq!( dicom_value!(Str, "Smith^John").to_str(), "Smith^John", ); assert_eq!( dicom_value!(Date, NaiveDate::from_ymd(2014, 10, 12)).to_str(), "20141012", ); assert_eq!( dicom_value!(Strs, [ "DERIVED", "PRIMARY", "WHOLE BODY", "EMISSION", ]) .to_str(), "DERIVED\\PRIMARY\\WHOLE BODY\\EMISSION", );
pub fn to_multi_str(&self) -> Cow<'_, [String]>
[src]
Convert the primitive value into a multi-string representation.
String values already encoded with the Str
and Strs
variants
are provided as is.
All other type variants are first converted to a string,
then collected into a vector.
Note:
As the process of reading a DICOM value
may not always preserve its original nature,
it is not guaranteed that to_multi_str()
returns strings with
the exact same byte sequence as the one originally found
at the source of the value,
even for the string variants.
Therefore, this method is not reliable
for compliant DICOM serialization.
Examples
assert_eq!( dicom_value!(Strs, [ "DERIVED", "PRIMARY", "WHOLE BODY", "EMISSION", ]) .to_multi_str(), &["DERIVED", "PRIMARY", "WHOLE BODY", "EMISSION"][..], ); assert_eq!( dicom_value!(Str, "Smith^John").to_multi_str(), &["Smith^John"][..], ); assert_eq!( dicom_value!(Date, NaiveDate::from_ymd(2014, 10, 12)).to_multi_str(), &["20141012"][..], ); assert_eq!( dicom_value!(I64, [128, 256, 512]).to_multi_str(), &["128", "256", "512"][..], );
pub fn to_bytes(&self) -> Cow<'_, [u8]>
[src]
Retrieve this DICOM value as raw bytes.
Binary numeric values are returned with a reintepretation of the holding vector's occupied data block as bytes, without copying, under the platform's native byte order.
String values already encoded with the Str
and Strs
variants
are provided as their respective bytes in UTF-8.
In the case of Strs
, the strings are first joined together
with a backslash ('\\'
).
Other type variants are first converted to a string,
joined together with a backslash,
then turned into a byte vector.
For values which are inherently textual according the standard,
this is equivalent to calling as_bytes()
after to_str()
.
Note:
As the process of reading a DICOM value
may not always preserve its original nature,
it is not guaranteed that to_bytes()
returns the same byte sequence
as the one originally found at the source of the value.
Therefore, this method is not reliable
for compliant DICOM serialization.
Examples
U8
provides a straight, zero-copy slice of bytes.
assert_eq!( PrimitiveValue::U8(smallvec![ 1, 2, 5, ]).to_bytes(), &[1, 2, 5][..], );
Other values are converted to text first.
assert_eq!( PrimitiveValue::from("Smith^John").to_bytes(), &b"Smith^John"[..], ); assert_eq!( PrimitiveValue::from(NaiveDate::from_ymd(2014, 10, 12)) .to_bytes(), &b"20141012"[..], ); assert_eq!( dicom_value!(Strs, [ "DERIVED", "PRIMARY", "WHOLE BODY", "EMISSION", ]) .to_bytes(), &b"DERIVED\\PRIMARY\\WHOLE BODY\\EMISSION"[..], );
pub fn to_int<T>(&self) -> Result<T, ConvertValueError> where
T: NumCast,
T: FromStr<Err = ParseIntError>,
[src]
T: NumCast,
T: FromStr<Err = ParseIntError>,
Retrieve a single integer of type T
from this value.
If the value is already represented as an integer, it is returned after a conversion to the target type. An error is returned if the integer cannot be represented by the given integer type. If the value is a string or sequence of strings, the first string is parsed to obtain an integer, potentially failing if the string does not represent a valid integer. The string is stripped of trailing whitespace before parsing, in order to account for the possible padding to even length. If the value is a sequence of U8 bytes, the bytes are individually interpreted as independent numbers. Otherwise, the operation fails.
Note that this method does not enable
the conversion of floating point numbers to integers via truncation.
If this is intentional,
retrieve a float via to_float32
or to_float64
instead,
then cast it to an integer.
Example
assert_eq!( PrimitiveValue::I32(smallvec![ 1, 2, 5, ]) .to_int::<u32>().ok(), Some(1_u32), ); assert_eq!( PrimitiveValue::from("505 ").to_int::<i32>().ok(), Some(505), );
pub fn to_multi_int<T>(&self) -> Result<Vec<T>, ConvertValueError> where
T: NumCast,
T: FromStr<Err = ParseIntError>,
[src]
T: NumCast,
T: FromStr<Err = ParseIntError>,
Retrieve a sequence of integers of type T
from this value.
If the values is already represented as an integer,
it is returned after a NumCast
conversion to the target type.
An error is returned if any of the integers cannot be represented
by the given integer type.
If the value is a string or sequence of strings,
each string is parsed to obtain an integer,
potentially failing if the string does not represent a valid integer.
The string is stripped of trailing whitespace before parsing,
in order to account for the possible padding to even length.
If the value is a sequence of U8 bytes,
the bytes are individually interpreted as independent numbers.
Otherwise, the operation fails.
Note that this method does not enable
the conversion of floating point numbers to integers via truncation.
If this is intentional,
retrieve a float via to_float32
or to_float64
instead,
then cast it to an integer.
Example
assert_eq!( PrimitiveValue::I32(smallvec![ 1, 2, 5, ]) .to_multi_int::<u32>().ok(), Some(vec![1_u32, 2, 5]), ); assert_eq!( dicom_value!(Strs, ["5050", "23 "]).to_multi_int::<i32>().ok(), Some(vec![5050, 23]), );
pub fn to_float32(&self) -> Result<f32, ConvertValueError>
[src]
Retrieve one single-precision floating point from this value.
If the value is already represented as a number,
it is returned after a conversion to f32
.
An error is returned if the number cannot be represented
by the given number type.
If the value is a string or sequence of strings,
the first string is parsed to obtain a number,
potentially failing if the string does not represent a valid number.
The string is stripped of trailing whitespace before parsing,
in order to account for the possible padding to even length.
If the value is a sequence of U8 bytes,
the bytes are individually interpreted as independent numbers.
Otherwise, the operation fails.
Example
assert_eq!( PrimitiveValue::F32(smallvec![ 1.5, 2., 5., ]) .to_float32().ok(), Some(1.5_f32), ); assert_eq!( PrimitiveValue::from("-6.75 ").to_float32().ok(), Some(-6.75), );
pub fn to_multi_float32(&self) -> Result<Vec<f32>, ConvertValueError>
[src]
Retrieve a sequence of single-precision floating point numbers from this value.
If the value is already represented as numbers,
they are returned after a conversion to f32
.
An error is returned if any of the numbers cannot be represented
by an f32
.
If the value is a string or sequence of strings,
the strings are parsed to obtain a number,
potentially failing if the string does not represent a valid number.
The string is stripped of trailing whitespace before parsing,
in order to account for the possible padding to even length.
If the value is a sequence of U8 bytes,
the bytes are individually interpreted as independent numbers.
Otherwise, the operation fails.
Example
assert_eq!( PrimitiveValue::F32(smallvec![ 1.5, 2., 5., ]) .to_multi_float32().ok(), Some(vec![1.5_f32, 2., 5.]), ); assert_eq!( PrimitiveValue::from("-6.75 ").to_multi_float32().ok(), Some(vec![-6.75]), );
pub fn to_float64(&self) -> Result<f64, ConvertValueError>
[src]
Retrieve one double-precision floating point from this value.
If the value is already represented as a number,
it is returned after a conversion to f64
.
An error is returned if the number cannot be represented
by the given number type.
If the value is a string or sequence of strings,
the first string is parsed to obtain a number,
potentially failing if the string does not represent a valid number.
If the value is a sequence of U8 bytes,
the bytes are individually interpreted as independent numbers.
Otherwise, the operation fails.
Example
assert_eq!( PrimitiveValue::F64(smallvec![ 1.5, 2., 5., ]) .to_float64().ok(), Some(1.5_f64), ); assert_eq!( PrimitiveValue::from("-6.75 ").to_float64().ok(), Some(-6.75), );
pub fn to_multi_float64(&self) -> Result<Vec<f64>, ConvertValueError>
[src]
Retrieve a sequence of double-precision floating point numbers from this value.
If the value is already represented as numbers,
they are returned after a conversion to f64
.
An error is returned if any of the numbers cannot be represented
by an f64
.
If the value is a string or sequence of strings,
the strings are parsed to obtain a number,
potentially failing if the string does not represent a valid number.
The string is stripped of trailing whitespace before parsing,
in order to account for the possible padding to even length.
If the value is a sequence of U8 bytes,
the bytes are individually interpreted as independent numbers.
Otherwise, the operation fails.
Example
assert_eq!( PrimitiveValue::F64(smallvec![ 1.5, 2., 5., ]) .to_multi_float64().ok(), Some(vec![1.5_f64, 2., 5.]), ); assert_eq!( PrimitiveValue::from("-6.75 ").to_multi_float64().ok(), Some(vec![-6.75]), );
pub fn to_date(&self) -> Result<NaiveDate, ConvertValueError>
[src]
Retrieve a single DICOM date from this value.
If the value is already represented as a date, it is returned as is. If the value is a string or sequence of strings, the first string is decoded to obtain a date, potentially failing if the string does not represent a valid date. If the value is a sequence of U8 bytes, the bytes are first interpreted as an ASCII character string. Otherwise, the operation fails.
Example
assert_eq!( PrimitiveValue::Date(smallvec![ NaiveDate::from_ymd(2014, 10, 12), ]) .to_date().ok(), Some(NaiveDate::from_ymd(2014, 10, 12)), ); assert_eq!( PrimitiveValue::Strs(smallvec![ "20141012".to_string(), ]) .to_date().ok(), Some(NaiveDate::from_ymd(2014, 10, 12)), );
pub fn to_multi_date(&self) -> Result<Vec<NaiveDate>, ConvertValueError>
[src]
Retrieve the full sequence of DICOM dates from this value.
If the value is already represented as a sequence of dates, it is returned as is. If the value is a string or sequence of strings, the strings are decoded to obtain a date, potentially failing if any of the strings does not represent a valid date. If the value is a sequence of U8 bytes, the bytes are first interpreted as an ASCII character string, then as a backslash-separated list of dates. Otherwise, the operation fails.
Example
assert_eq!( PrimitiveValue::Date(smallvec![ NaiveDate::from_ymd(2014, 10, 12), ]).to_multi_date().ok(), Some(vec![NaiveDate::from_ymd(2014, 10, 12)]), ); assert_eq!( PrimitiveValue::Strs(smallvec![ "20141012".to_string(), "20200828".to_string(), ]).to_multi_date().ok(), Some(vec![ NaiveDate::from_ymd(2014, 10, 12), NaiveDate::from_ymd(2020, 8, 28), ]), );
pub fn to_time(&self) -> Result<NaiveTime, ConvertValueError>
[src]
Retrieve a single DICOM time from this value.
If the value is already represented as a time, it is returned as is. If the value is a string or sequence of strings, the first string is decoded to obtain a time, potentially failing if the string does not represent a valid time. If the value is a sequence of U8 bytes, the bytes are first interpreted as an ASCII character string. Otherwise, the operation fails.
Example
assert_eq!( PrimitiveValue::from(NaiveTime::from_hms(11, 2, 45)).to_time().ok(), Some(NaiveTime::from_hms(11, 2, 45)), ); assert_eq!( PrimitiveValue::from("110245.78").to_time().ok(), Some(NaiveTime::from_hms_milli(11, 2, 45, 780)), );
pub fn to_multi_time(&self) -> Result<Vec<NaiveTime>, ConvertValueError>
[src]
Retrieve the full sequence of DICOM times from this value.
If the value is already represented as a sequence of times, it is returned as is. If the value is a string or sequence of strings, the strings are decoded to obtain a date, potentially failing if any of the strings does not represent a valid date. If the value is a sequence of U8 bytes, the bytes are first interpreted as an ASCII character string, then as a backslash-separated list of times. Otherwise, the operation fails.
Example
assert_eq!( PrimitiveValue::from(NaiveTime::from_hms(22, 58, 2)).to_multi_time().ok(), Some(vec![NaiveTime::from_hms(22, 58, 2)]), ); assert_eq!( PrimitiveValue::Strs(smallvec![ "225802".to_string(), "225916.742388".to_string(), ]).to_multi_time().ok(), Some(vec![ NaiveTime::from_hms(22, 58, 2), NaiveTime::from_hms_micro(22, 59, 16, 742388), ]), );
pub fn to_datetime(
&self,
default_offset: FixedOffset
) -> Result<DateTime<FixedOffset>, ConvertValueError>
[src]
&self,
default_offset: FixedOffset
) -> Result<DateTime<FixedOffset>, ConvertValueError>
Retrieve a single DICOM date-time from this value.
If the value is already represented as a date-time,
it is returned as is.
If the value is a string or sequence of strings,
the first string is decoded to obtain a date-time,
potentially failing if the string does not represent a valid time.
If the value in its textual form does not present a time zone,
default_offset
is used.
If the value is a sequence of U8 bytes, the bytes are
first interpreted as an ASCII character string.
Otherwise, the operation fails.
Users of this method are advised to retrieve the default time zone offset from the same source of the DICOM value.
Example
let default_offset = FixedOffset::east(0); assert_eq!( PrimitiveValue::from( FixedOffset::east(0) .ymd(2012, 12, 21) .and_hms(9, 30, 1) ).to_datetime(default_offset).ok(), Some(FixedOffset::east(0) .ymd(2012, 12, 21) .and_hms(9, 30, 1) ), ); assert_eq!( PrimitiveValue::from("20121221093001") .to_datetime(default_offset).ok(), Some(FixedOffset::east(0) .ymd(2012, 12, 21) .and_hms(9, 30, 1) ), );
pub fn to_multi_datetime(
&self,
default_offset: FixedOffset
) -> Result<Vec<DateTime<FixedOffset>>, ConvertValueError>
[src]
&self,
default_offset: FixedOffset
) -> Result<Vec<DateTime<FixedOffset>>, ConvertValueError>
Retrieve the full sequence of DICOM date-times from this value.
If the value is already represented as a sequence of date-times, it is returned as is. If the value is a string or sequence of strings, the strings are decoded to obtain a date, potentially failing if any of the strings does not represent a valid date. If the value is a sequence of U8 bytes, the bytes are first interpreted as an ASCII character string, then as a backslash-separated list of date-times. Otherwise, the operation fails.
Example
let default_offset = FixedOffset::east(0); assert_eq!( PrimitiveValue::from( FixedOffset::east(0) .ymd(2012, 12, 21) .and_hms(9, 30, 1) ).to_multi_datetime(default_offset).ok(), Some(vec![FixedOffset::east(0) .ymd(2012, 12, 21) .and_hms(9, 30, 1) ]), ); assert_eq!( PrimitiveValue::Strs(smallvec![ "20121221093001".to_string(), "20180102100123".to_string(), ]).to_multi_datetime(default_offset).ok(), Some(vec![ FixedOffset::east(0) .ymd(2012, 12, 21) .and_hms(9, 30, 1), FixedOffset::east(0) .ymd(2018, 1, 2) .and_hms(10, 1, 23) ]), );
impl PrimitiveValue
[src]
Per variant, strongly checked getters to DICOM values.
Conversions from one representation to another do not take place when using these methods.
pub fn string(&self) -> Result<&str, CastValueError>
[src]
Get a single string value.
If it contains multiple strings, only the first one is returned.
An error is returned if the variant is not compatible.
To enable conversions of other variants to a textual representation,
see to_str()
instead.
pub fn strings(&self) -> Result<&[String], CastValueError>
[src]
Get the inner sequence of string values
if the variant is either Str
or Strs
.
An error is returned if the variant is not compatible.
To enable conversions of other variants to a textual representation,
see to_str()
instead.
pub fn tag(&self) -> Result<Tag, CastValueError>
[src]
Get a single value of the requested type. If it contains multiple values, only the first one is returned. An error is returned if the variant is not compatible.
pub fn tags(&self) -> Result<&[Tag], CastValueError>
[src]
Get a sequence of values of the requested type without copying. An error is returned if the variant is not compatible.
pub fn date(&self) -> Result<NaiveDate, CastValueError>
[src]
Get a single value of the requested type. If it contains multiple values, only the first one is returned. An error is returned if the variant is not compatible.
pub fn dates(&self) -> Result<&[NaiveDate], CastValueError>
[src]
Get a sequence of values of the requested type without copying. An error is returned if the variant is not compatible.
pub fn time(&self) -> Result<NaiveTime, CastValueError>
[src]
Get a single value of the requested type. If it contains multiple values, only the first one is returned. An error is returned if the variant is not compatible.
pub fn times(&self) -> Result<&[NaiveTime], CastValueError>
[src]
Get a sequence of values of the requested type without copying. An error is returned if the variant is not compatible.
pub fn datetime(&self) -> Result<DateTime<FixedOffset>, CastValueError>
[src]
Get a single value of the requested type. If it contains multiple values, only the first one is returned. An error is returned if the variant is not compatible.
pub fn datetimes(&self) -> Result<&[DateTime<FixedOffset>], CastValueError>
[src]
Get a sequence of values of the requested type without copying. An error is returned if the variant is not compatible.
pub fn uint8(&self) -> Result<u8, CastValueError>
[src]
Get a single value of the requested type. If it contains multiple values, only the first one is returned. An error is returned if the variant is not compatible.
pub fn uint8_slice(&self) -> Result<&[u8], CastValueError>
[src]
Get a sequence of values of the requested type without copying. An error is returned if the variant is not compatible.
pub fn uint16(&self) -> Result<u16, CastValueError>
[src]
Get a single value of the requested type. If it contains multiple values, only the first one is returned. An error is returned if the variant is not compatible.
pub fn uint16_slice(&self) -> Result<&[u16], CastValueError>
[src]
Get a sequence of values of the requested type without copying. An error is returned if the variant is not compatible.
pub fn int16(&self) -> Result<i16, CastValueError>
[src]
Get a single value of the requested type. If it contains multiple values, only the first one is returned. An error is returned if the variant is not compatible.
pub fn int16_slice(&self) -> Result<&[i16], CastValueError>
[src]
Get a sequence of values of the requested type without copying. An error is returned if the variant is not compatible.
pub fn uint32(&self) -> Result<u32, CastValueError>
[src]
Get a single value of the requested type. If it contains multiple values, only the first one is returned. An error is returned if the variant is not compatible.
pub fn uint32_slice(&self) -> Result<&[u32], CastValueError>
[src]
Get a sequence of values of the requested type without copying. An error is returned if the variant is not compatible.
pub fn int32(&self) -> Result<i32, CastValueError>
[src]
Get a single value of the requested type. If it contains multiple values, only the first one is returned. An error is returned if the variant is not compatible.
pub fn int32_slice(&self) -> Result<&[i32], CastValueError>
[src]
Get a sequence of values of the requested type without copying. An error is returned if the variant is not compatible.
pub fn int64(&self) -> Result<i64, CastValueError>
[src]
Get a single value of the requested type. If it contains multiple values, only the first one is returned. An error is returned if the variant is not compatible.
pub fn int64_slice(&self) -> Result<&[i64], CastValueError>
[src]
Get a sequence of values of the requested type without copying. An error is returned if the variant is not compatible.
pub fn uint64(&self) -> Result<u64, CastValueError>
[src]
Get a single value of the requested type. If it contains multiple values, only the first one is returned. An error is returned if the variant is not compatible.
pub fn uint64_slice(&self) -> Result<&[u64], CastValueError>
[src]
Get a sequence of values of the requested type without copying. An error is returned if the variant is not compatible.
pub fn float32(&self) -> Result<f32, CastValueError>
[src]
Get a single value of the requested type. If it contains multiple values, only the first one is returned. An error is returned if the variant is not compatible.
pub fn float32_slice(&self) -> Result<&[f32], CastValueError>
[src]
Get a sequence of values of the requested type without copying. An error is returned if the variant is not compatible.
pub fn float64(&self) -> Result<f64, CastValueError>
[src]
Get a single value of the requested type. If it contains multiple values, only the first one is returned. An error is returned if the variant is not compatible.
pub fn float64_slice(&self) -> Result<&[f64], CastValueError>
[src]
Get a sequence of values of the requested type without copying. An error is returned if the variant is not compatible.
Trait Implementations
impl Clone for PrimitiveValue
[src]
fn clone(&self) -> PrimitiveValue
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for PrimitiveValue
[src]
impl DicomValueType for PrimitiveValue
[src]
fn value_type(&self) -> ValueType
[src]
fn cardinality(&self) -> usize
[src]
impl Display for PrimitiveValue
[src]
The output of this method is equivalent to calling the method to_str
impl<'_> From<&'_ [DateTime<FixedOffset>; 1]> for PrimitiveValue
[src]
impl<'_> From<&'_ [DateTime<FixedOffset>; 2]> for PrimitiveValue
[src]
impl<'_> From<&'_ [DateTime<FixedOffset>; 3]> for PrimitiveValue
[src]
impl<'_> From<&'_ [DateTime<FixedOffset>; 4]> for PrimitiveValue
[src]
impl<'_> From<&'_ [DateTime<FixedOffset>; 5]> for PrimitiveValue
[src]
impl<'_> From<&'_ [DateTime<FixedOffset>; 6]> for PrimitiveValue
[src]
impl<'_> From<&'_ [DateTime<FixedOffset>; 7]> for PrimitiveValue
[src]
impl<'_> From<&'_ [DateTime<FixedOffset>; 8]> for PrimitiveValue
[src]
impl<'_> From<&'_ [NaiveDate; 1]> for PrimitiveValue
[src]
impl<'_> From<&'_ [NaiveDate; 2]> for PrimitiveValue
[src]
impl<'_> From<&'_ [NaiveDate; 3]> for PrimitiveValue
[src]
impl<'_> From<&'_ [NaiveDate; 4]> for PrimitiveValue
[src]
impl<'_> From<&'_ [NaiveDate; 5]> for PrimitiveValue
[src]
impl<'_> From<&'_ [NaiveDate; 6]> for PrimitiveValue
[src]
impl<'_> From<&'_ [NaiveDate; 7]> for PrimitiveValue
[src]
impl<'_> From<&'_ [NaiveDate; 8]> for PrimitiveValue
[src]
impl<'_> From<&'_ [NaiveTime; 1]> for PrimitiveValue
[src]
impl<'_> From<&'_ [NaiveTime; 2]> for PrimitiveValue
[src]
impl<'_> From<&'_ [NaiveTime; 3]> for PrimitiveValue
[src]
impl<'_> From<&'_ [NaiveTime; 4]> for PrimitiveValue
[src]
impl<'_> From<&'_ [NaiveTime; 5]> for PrimitiveValue
[src]
impl<'_> From<&'_ [NaiveTime; 6]> for PrimitiveValue
[src]
impl<'_> From<&'_ [NaiveTime; 7]> for PrimitiveValue
[src]
impl<'_> From<&'_ [NaiveTime; 8]> for PrimitiveValue
[src]
impl<'_> From<&'_ [f32; 1]> for PrimitiveValue
[src]
impl<'_> From<&'_ [f32; 2]> for PrimitiveValue
[src]
impl<'_> From<&'_ [f32; 3]> for PrimitiveValue
[src]
impl<'_> From<&'_ [f32; 4]> for PrimitiveValue
[src]
impl<'_> From<&'_ [f32; 5]> for PrimitiveValue
[src]
impl<'_> From<&'_ [f32; 6]> for PrimitiveValue
[src]
impl<'_> From<&'_ [f32; 7]> for PrimitiveValue
[src]
impl<'_> From<&'_ [f32; 8]> for PrimitiveValue
[src]
impl<'_> From<&'_ [f64; 1]> for PrimitiveValue
[src]
impl<'_> From<&'_ [f64; 2]> for PrimitiveValue
[src]
impl<'_> From<&'_ [f64; 3]> for PrimitiveValue
[src]
impl<'_> From<&'_ [f64; 4]> for PrimitiveValue
[src]
impl<'_> From<&'_ [f64; 5]> for PrimitiveValue
[src]
impl<'_> From<&'_ [f64; 6]> for PrimitiveValue
[src]
impl<'_> From<&'_ [f64; 7]> for PrimitiveValue
[src]
impl<'_> From<&'_ [f64; 8]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i16; 1]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i16; 2]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i16; 3]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i16; 4]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i16; 5]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i16; 6]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i16; 7]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i16; 8]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i32; 1]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i32; 2]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i32; 3]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i32; 4]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i32; 5]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i32; 6]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i32; 7]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i32; 8]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i64; 1]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i64; 2]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i64; 3]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i64; 4]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i64; 5]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i64; 6]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i64; 7]> for PrimitiveValue
[src]
impl<'_> From<&'_ [i64; 8]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u16; 1]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u16; 2]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u16; 3]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u16; 4]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u16; 5]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u16; 6]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u16; 7]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u16; 8]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u32; 1]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u32; 2]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u32; 3]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u32; 4]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u32; 5]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u32; 6]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u32; 7]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u32; 8]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u64; 1]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u64; 2]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u64; 3]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u64; 4]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u64; 5]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u64; 6]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u64; 7]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u64; 8]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u8; 1]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u8; 2]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u8; 3]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u8; 4]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u8; 5]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u8; 6]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u8; 7]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u8; 8]> for PrimitiveValue
[src]
impl<'_> From<&'_ [u8]> for PrimitiveValue
[src]
impl<'_> From<&'_ str> for PrimitiveValue
[src]
impl From<[DateTime<FixedOffset>; 1]> for PrimitiveValue
[src]
impl From<[DateTime<FixedOffset>; 2]> for PrimitiveValue
[src]
impl From<[DateTime<FixedOffset>; 3]> for PrimitiveValue
[src]
impl From<[DateTime<FixedOffset>; 4]> for PrimitiveValue
[src]
impl From<[DateTime<FixedOffset>; 5]> for PrimitiveValue
[src]
impl From<[DateTime<FixedOffset>; 6]> for PrimitiveValue
[src]
impl From<[DateTime<FixedOffset>; 7]> for PrimitiveValue
[src]
impl From<[DateTime<FixedOffset>; 8]> for PrimitiveValue
[src]
impl From<[NaiveDate; 1]> for PrimitiveValue
[src]
impl From<[NaiveDate; 2]> for PrimitiveValue
[src]
impl From<[NaiveDate; 3]> for PrimitiveValue
[src]
impl From<[NaiveDate; 4]> for PrimitiveValue
[src]
impl From<[NaiveDate; 5]> for PrimitiveValue
[src]
impl From<[NaiveDate; 6]> for PrimitiveValue
[src]
impl From<[NaiveDate; 7]> for PrimitiveValue
[src]
impl From<[NaiveDate; 8]> for PrimitiveValue
[src]
impl From<[NaiveTime; 1]> for PrimitiveValue
[src]
impl From<[NaiveTime; 2]> for PrimitiveValue
[src]
impl From<[NaiveTime; 3]> for PrimitiveValue
[src]
impl From<[NaiveTime; 4]> for PrimitiveValue
[src]
impl From<[NaiveTime; 5]> for PrimitiveValue
[src]
impl From<[NaiveTime; 6]> for PrimitiveValue
[src]
impl From<[NaiveTime; 7]> for PrimitiveValue
[src]
impl From<[NaiveTime; 8]> for PrimitiveValue
[src]
impl From<[f32; 1]> for PrimitiveValue
[src]
impl From<[f32; 2]> for PrimitiveValue
[src]
impl From<[f32; 3]> for PrimitiveValue
[src]
impl From<[f32; 4]> for PrimitiveValue
[src]
impl From<[f32; 5]> for PrimitiveValue
[src]
impl From<[f32; 6]> for PrimitiveValue
[src]
impl From<[f32; 7]> for PrimitiveValue
[src]
impl From<[f32; 8]> for PrimitiveValue
[src]
impl From<[f64; 1]> for PrimitiveValue
[src]
impl From<[f64; 2]> for PrimitiveValue
[src]
impl From<[f64; 3]> for PrimitiveValue
[src]
impl From<[f64; 4]> for PrimitiveValue
[src]
impl From<[f64; 5]> for PrimitiveValue
[src]
impl From<[f64; 6]> for PrimitiveValue
[src]
impl From<[f64; 7]> for PrimitiveValue
[src]
impl From<[f64; 8]> for PrimitiveValue
[src]
impl From<[i16; 1]> for PrimitiveValue
[src]
impl From<[i16; 2]> for PrimitiveValue
[src]
impl From<[i16; 3]> for PrimitiveValue
[src]
impl From<[i16; 4]> for PrimitiveValue
[src]
impl From<[i16; 5]> for PrimitiveValue
[src]
impl From<[i16; 6]> for PrimitiveValue
[src]
impl From<[i16; 7]> for PrimitiveValue
[src]
impl From<[i16; 8]> for PrimitiveValue
[src]
impl From<[i32; 1]> for PrimitiveValue
[src]
impl From<[i32; 2]> for PrimitiveValue
[src]
impl From<[i32; 3]> for PrimitiveValue
[src]
impl From<[i32; 4]> for PrimitiveValue
[src]
impl From<[i32; 5]> for PrimitiveValue
[src]
impl From<[i32; 6]> for PrimitiveValue
[src]
impl From<[i32; 7]> for PrimitiveValue
[src]
impl From<[i32; 8]> for PrimitiveValue
[src]
impl From<[i64; 1]> for PrimitiveValue
[src]
impl From<[i64; 2]> for PrimitiveValue
[src]
impl From<[i64; 3]> for PrimitiveValue
[src]
impl From<[i64; 4]> for PrimitiveValue
[src]
impl From<[i64; 5]> for PrimitiveValue
[src]
impl From<[i64; 6]> for PrimitiveValue
[src]
impl From<[i64; 7]> for PrimitiveValue
[src]
impl From<[i64; 8]> for PrimitiveValue
[src]
impl From<[u16; 1]> for PrimitiveValue
[src]
impl From<[u16; 2]> for PrimitiveValue
[src]
impl From<[u16; 3]> for PrimitiveValue
[src]
impl From<[u16; 4]> for PrimitiveValue
[src]
impl From<[u16; 5]> for PrimitiveValue
[src]
impl From<[u16; 6]> for PrimitiveValue
[src]
impl From<[u16; 7]> for PrimitiveValue
[src]
impl From<[u16; 8]> for PrimitiveValue
[src]
impl From<[u32; 1]> for PrimitiveValue
[src]
impl From<[u32; 2]> for PrimitiveValue
[src]
impl From<[u32; 3]> for PrimitiveValue
[src]
impl From<[u32; 4]> for PrimitiveValue
[src]
impl From<[u32; 5]> for PrimitiveValue
[src]
impl From<[u32; 6]> for PrimitiveValue
[src]
impl From<[u32; 7]> for PrimitiveValue
[src]
impl From<[u32; 8]> for PrimitiveValue
[src]
impl From<[u64; 1]> for PrimitiveValue
[src]
impl From<[u64; 2]> for PrimitiveValue
[src]
impl From<[u64; 3]> for PrimitiveValue
[src]
impl From<[u64; 4]> for PrimitiveValue
[src]
impl From<[u64; 5]> for PrimitiveValue
[src]
impl From<[u64; 6]> for PrimitiveValue
[src]
impl From<[u64; 7]> for PrimitiveValue
[src]
impl From<[u64; 8]> for PrimitiveValue
[src]
impl From<[u8; 1]> for PrimitiveValue
[src]
impl From<[u8; 2]> for PrimitiveValue
[src]
impl From<[u8; 3]> for PrimitiveValue
[src]
impl From<[u8; 4]> for PrimitiveValue
[src]
impl From<[u8; 5]> for PrimitiveValue
[src]
impl From<[u8; 6]> for PrimitiveValue
[src]
impl From<[u8; 7]> for PrimitiveValue
[src]
impl From<[u8; 8]> for PrimitiveValue
[src]
impl From<DateTime<FixedOffset>> for PrimitiveValue
[src]
fn from(value: DateTime<FixedOffset>) -> Self
[src]
impl From<NaiveDate> for PrimitiveValue
[src]
impl From<NaiveTime> for PrimitiveValue
[src]
impl<I, P> From<PrimitiveValue> for Value<I, P>
[src]
fn from(v: PrimitiveValue) -> Self
[src]
impl From<String> for PrimitiveValue
[src]
impl From<Tag> for PrimitiveValue
[src]
impl From<Vec<u8>> for PrimitiveValue
[src]
impl From<f32> for PrimitiveValue
[src]
impl From<f64> for PrimitiveValue
[src]
impl From<i16> for PrimitiveValue
[src]
impl From<i32> for PrimitiveValue
[src]
impl From<i64> for PrimitiveValue
[src]
impl From<u16> for PrimitiveValue
[src]
impl From<u32> for PrimitiveValue
[src]
impl From<u64> for PrimitiveValue
[src]
impl From<u8> for PrimitiveValue
[src]
impl HasLength for PrimitiveValue
[src]
impl PartialEq<PrimitiveValue> for PrimitiveValue
[src]
fn eq(&self, other: &PrimitiveValue) -> bool
[src]
fn ne(&self, other: &PrimitiveValue) -> bool
[src]
impl StructuralPartialEq for PrimitiveValue
[src]
Auto Trait Implementations
impl RefUnwindSafe for PrimitiveValue
impl Send for PrimitiveValue
impl Sync for PrimitiveValue
impl Unpin for PrimitiveValue
impl UnwindSafe for PrimitiveValue
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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>,