Enum ion_binary_rs::IonValue
source · [−]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
sourceimpl From<BigDecimal> for IonValue
impl From<BigDecimal> for IonValue
sourcefn from(value: BigDecimal) -> IonValue
fn from(value: BigDecimal) -> IonValue
Converts to this type from the input type.
sourceimpl From<DateTime<FixedOffset>> for IonValue
impl From<DateTime<FixedOffset>> for IonValue
sourcefn from(value: DateTime<FixedOffset>) -> IonValue
fn from(value: DateTime<FixedOffset>) -> IonValue
Converts to this type from the input type.
sourceimpl TryFrom<&IonValue> for Vec<IonValue>
impl TryFrom<&IonValue> for Vec<IonValue>
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: &IonValue) -> Result<Self, IonParserError>
fn try_from(value: &IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<&IonValue> for f32
impl TryFrom<&IonValue> for f32
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: &IonValue) -> Result<Self, IonParserError>
fn try_from(value: &IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<&IonValue> for DateTime<Utc>
impl TryFrom<&IonValue> for DateTime<Utc>
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: &IonValue) -> Result<Self, IonParserError>
fn try_from(value: &IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<&IonValue> for DateTime<FixedOffset>
impl TryFrom<&IonValue> for DateTime<FixedOffset>
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: &IonValue) -> Result<Self, IonParserError>
fn try_from(value: &IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<&IonValue> for bool
impl TryFrom<&IonValue> for bool
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: &IonValue) -> Result<Self, IonParserError>
fn try_from(value: &IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<&IonValue> for Vec<u8>
impl TryFrom<&IonValue> for Vec<u8>
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: &IonValue) -> Result<Self, IonParserError>
fn try_from(value: &IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<&IonValue> for Value
impl TryFrom<&IonValue> for Value
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: &IonValue) -> Result<Self, IonParserError>
fn try_from(value: &IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<&IonValue> for String
impl TryFrom<&IonValue> for String
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: &IonValue) -> Result<Self, IonParserError>
fn try_from(value: &IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<&IonValue> for u64
impl TryFrom<&IonValue> for u64
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: &IonValue) -> Result<Self, IonParserError>
fn try_from(value: &IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<&IonValue> for i64
impl TryFrom<&IonValue> for i64
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: &IonValue) -> Result<Self, IonParserError>
fn try_from(value: &IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<&IonValue> for u32
impl TryFrom<&IonValue> for u32
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: &IonValue) -> Result<Self, IonParserError>
fn try_from(value: &IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<&IonValue> for i32
impl TryFrom<&IonValue> for i32
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: &IonValue) -> Result<Self, IonParserError>
fn try_from(value: &IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<&IonValue> for BigUint
impl TryFrom<&IonValue> for BigUint
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: &IonValue) -> Result<Self, IonParserError>
fn try_from(value: &IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<&IonValue> for BigInt
impl TryFrom<&IonValue> for BigInt
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: &IonValue) -> Result<Self, IonParserError>
fn try_from(value: &IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<&IonValue> for f64
impl TryFrom<&IonValue> for f64
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: &IonValue) -> Result<Self, IonParserError>
fn try_from(value: &IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<IonValue> for String
impl TryFrom<IonValue> for String
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: IonValue) -> Result<Self, IonParserError>
fn try_from(value: IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<IonValue> for f32
impl TryFrom<IonValue> for f32
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: IonValue) -> Result<Self, IonParserError>
fn try_from(value: IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<IonValue> for DateTime<Utc>
impl TryFrom<IonValue> for DateTime<Utc>
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: IonValue) -> Result<Self, IonParserError>
fn try_from(value: IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<IonValue> for DateTime<FixedOffset>
impl TryFrom<IonValue> for DateTime<FixedOffset>
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: IonValue) -> Result<Self, IonParserError>
fn try_from(value: IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<IonValue> for bool
impl TryFrom<IonValue> for bool
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: IonValue) -> Result<Self, IonParserError>
fn try_from(value: IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<IonValue> for Vec<u8>
impl TryFrom<IonValue> for Vec<u8>
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: IonValue) -> Result<Self, IonParserError>
fn try_from(value: IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<IonValue> for Value
impl TryFrom<IonValue> for Value
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: IonValue) -> Result<Self, IonParserError>
fn try_from(value: IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<IonValue> for u64
impl TryFrom<IonValue> for u64
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: IonValue) -> Result<Self, IonParserError>
fn try_from(value: IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<IonValue> for i64
impl TryFrom<IonValue> for i64
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: IonValue) -> Result<Self, IonParserError>
fn try_from(value: IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<IonValue> for u32
impl TryFrom<IonValue> for u32
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: IonValue) -> Result<Self, IonParserError>
fn try_from(value: IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<IonValue> for i32
impl TryFrom<IonValue> for i32
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: IonValue) -> Result<Self, IonParserError>
fn try_from(value: IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<IonValue> for BigUint
impl TryFrom<IonValue> for BigUint
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: IonValue) -> Result<Self, IonParserError>
fn try_from(value: IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<IonValue> for BigInt
impl TryFrom<IonValue> for BigInt
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: IonValue) -> Result<Self, IonParserError>
fn try_from(value: IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<IonValue> for BigDecimal
impl TryFrom<IonValue> for BigDecimal
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: IonValue) -> Result<Self, IonParserError>
fn try_from(value: IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<IonValue> for f64
impl TryFrom<IonValue> for f64
type Error = IonParserError
type Error = IonParserError
The type returned in the event of a conversion error.
sourcefn try_from(value: IonValue) -> Result<Self, IonParserError>
fn try_from(value: IonValue) -> Result<Self, IonParserError>
Performs the conversion.
sourceimpl TryFrom<Value> for IonValue
impl TryFrom<Value> for IonValue
type Error = SerdeJsonParseError
type Error = SerdeJsonParseError
The type returned in the event of a conversion error.
impl Eq for IonValue
impl StructuralPartialEq for IonValue
Auto Trait Implementations
impl RefUnwindSafe for IonValue
impl Send for IonValue
impl Sync for IonValue
impl Unpin for IonValue
impl UnwindSafe for IonValue
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more