pub enum IonValue {
Show 15 variants Null(NullIonValue), Bool(bool), Integer(i64), BigInteger(BigInt), Float(f64), Decimal(BigDecimal), DateTime(DateTime<FixedOffset>), String(String), Symbol(String), Clob(Vec<u8>), Blob(Vec<u8>), List(Vec<IonValue>), SExpr(Vec<IonValue>), Struct(HashMap<String, IonValue>), Annotation(Vec<String>, Box<IonValue>),
}
Expand description

The structure wrapping all possible return ion values by the IonParser.

Please, pay attention to Integer and BigInteger. The parser will return the most adequate integer type. If you expect small numbers you can get by with Integer alone, but if you don’t know, you will need to match both types.

Floats are implemented only using f64. Previously there was Float32 and Float64, but there are some problems with IonHash and QLDB when using Float32.

Variants§

§

Null(NullIonValue)

§

Bool(bool)

§

Integer(i64)

§

BigInteger(BigInt)

§

Float(f64)

§

Decimal(BigDecimal)

§

DateTime(DateTime<FixedOffset>)

§

String(String)

§

Symbol(String)

§

Clob(Vec<u8>)

§

Blob(Vec<u8>)

§

List(Vec<IonValue>)

§

SExpr(Vec<IonValue>)

§

Struct(HashMap<String, IonValue>)

§

Annotation(Vec<String>, Box<IonValue>)

Trait Implementations§

source§

impl Clone for IonValue

source§

fn clone(&self) -> IonValue

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for IonValue

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<I: Into<IonValue> + Clone> From<&[I]> for IonValue

source§

fn from(values: &[I]) -> Self

Converts to this type from the input type.
source§

impl From<&[u8]> for IonValue

source§

fn from(value: &[u8]) -> IonValue

Converts to this type from the input type.
source§

impl<I: Into<IonValue> + Clone> From<&I> for IonValue

source§

fn from(value: &I) -> IonValue

Converts to this type from the input type.
source§

impl From<&str> for IonValue

source§

fn from(value: &str) -> IonValue

Converts to this type from the input type.
source§

impl From<BigDecimal> for IonValue

source§

fn from(value: BigDecimal) -> IonValue

Converts to this type from the input type.
source§

impl From<BigInt> for IonValue

source§

fn from(value: BigInt) -> IonValue

Converts to this type from the input type.
source§

impl From<BigUint> for IonValue

source§

fn from(value: BigUint) -> IonValue

Converts to this type from the input type.
source§

impl From<DateTime<FixedOffset>> for IonValue

source§

fn from(value: DateTime<FixedOffset>) -> IonValue

Converts to this type from the input type.
source§

impl From<DateTime<Utc>> for IonValue

source§

fn from(value: DateTime<Utc>) -> IonValue

Converts to this type from the input type.
source§

impl<I: Into<IonValue>, K: Into<String>> From<HashMap<K, I>> for IonValue

source§

fn from(values: HashMap<K, I>) -> Self

Converts to this type from the input type.
source§

impl From<String> for IonValue

source§

fn from(value: String) -> IonValue

Converts to this type from the input type.
source§

impl<I: Into<IonValue>> From<Vec<I>> for IonValue

source§

fn from(values: Vec<I>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<u8>> for IonValue

source§

fn from(value: Vec<u8>) -> IonValue

Converts to this type from the input type.
source§

impl From<bool> for IonValue

source§

fn from(value: bool) -> IonValue

Converts to this type from the input type.
source§

impl From<f32> for IonValue

source§

fn from(value: f32) -> IonValue

Converts to this type from the input type.
source§

impl From<f64> for IonValue

source§

fn from(value: f64) -> IonValue

Converts to this type from the input type.
source§

impl From<i128> for IonValue

source§

fn from(value: i128) -> IonValue

Converts to this type from the input type.
source§

impl From<i16> for IonValue

source§

fn from(value: i16) -> IonValue

Converts to this type from the input type.
source§

impl From<i32> for IonValue

source§

fn from(value: i32) -> IonValue

Converts to this type from the input type.
source§

impl From<i64> for IonValue

source§

fn from(value: i64) -> IonValue

Converts to this type from the input type.
source§

impl From<u128> for IonValue

source§

fn from(value: u128) -> IonValue

Converts to this type from the input type.
source§

impl From<u16> for IonValue

source§

fn from(value: u16) -> IonValue

Converts to this type from the input type.
source§

impl From<u32> for IonValue

source§

fn from(value: u32) -> IonValue

Converts to this type from the input type.
source§

impl From<u64> for IonValue

source§

fn from(value: u64) -> IonValue

Converts to this type from the input type.
source§

impl PartialEq for IonValue

source§

fn eq(&self, other: &IonValue) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl TryFrom<&IonValue> for BigInt

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: &IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<&IonValue> for BigUint

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: &IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<&IonValue> for DateTime<FixedOffset>

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: &IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<&IonValue> for DateTime<Utc>

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: &IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<&IonValue> for HashMap<String, IonValue>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(value: &IonValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<&IonValue> for String

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: &IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<&IonValue> for Value

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: &IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<&IonValue> for Vec<IonValue>

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: &IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<&IonValue> for Vec<u8>

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: &IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<&IonValue> for bool

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: &IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<&IonValue> for f32

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: &IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<&IonValue> for f64

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: &IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<&IonValue> for i32

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: &IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<&IonValue> for i64

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: &IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<&IonValue> for u32

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: &IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<&IonValue> for u64

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: &IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<IonValue> for BigDecimal

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<IonValue> for BigInt

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<IonValue> for BigUint

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<IonValue> for DateTime<FixedOffset>

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<IonValue> for DateTime<Utc>

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<IonValue> for HashMap<String, IonValue>

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: IonValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<IonValue> for String

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<IonValue> for Value

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<IonValue> for Vec<u8>

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<IonValue> for bool

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<IonValue> for f32

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<IonValue> for f64

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<IonValue> for i32

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<IonValue> for i64

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<IonValue> for u32

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<IonValue> for u64

§

type Error = IonParserError

The type returned in the event of a conversion error.
source§

fn try_from(value: IonValue) -> Result<Self, IonParserError>

Performs the conversion.
source§

impl TryFrom<Value> for IonValue

§

type Error = SerdeJsonParseError

The type returned in the event of a conversion error.
source§

fn try_from(value: Value) -> Result<IonValue, SerdeJsonParseError>

Performs the conversion.
source§

impl Eq for IonValue

source§

impl StructuralPartialEq for IonValue

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.