[−][src]Enum avro_rs::types::Value
A valid Avro value.
More information about Avro values can be found in the Avro Specification
Variants
A null
Avro value.
Boolean(bool)
A boolean
Avro value.
Int(i32)
A int
Avro value.
Long(i64)
A long
Avro value.
Float(f32)
A float
Avro value.
Double(f64)
A double
Avro value.
A bytes
Avro value.
String(String)
A string
Avro value.
A fixed
Avro value.
The size of the fixed value is represented as a usize
.
An enum
Avro value.
An Enum is represented by a symbol and its position in the symbols list of its corresponding schema. This allows schema-less encoding, as well as schema resolution while reading values.
An union
Avro value.
An array
Avro value.
A map
Avro value.
A record
Avro value.
A Record is represented by a vector of (<record name>
, value
).
This allows schema-less encoding.
See Record for a more user-friendly support.
Date(i32)
A date value.
Serialized and deserialized as i32
directly. Can only be deserialized properly with a
schema.
Decimal(Decimal)
An Avro Decimal value. Bytes are in big-endian order, per the Avro spec.
TimeMillis(i32)
Time in milliseconds.
TimeMicros(i64)
Time in microseconds.
TimestampMillis(i64)
Timestamp in milliseconds.
TimestampMicros(i64)
Timestamp in microseconds.
Duration(Duration)
Avro Duration. An amount of time defined by months, days and milliseconds.
Uuid(Uuid)
Universally unique identifier. Universally unique identifier.
Implementations
impl Value
[src]
pub fn validate(&self, schema: &Schema) -> bool
[src]
Validate the value against the given Schema.
See the Avro specification for the full set of rules of schema validation.
pub fn resolve(mut self: Self, schema: &Schema) -> AvroResult<Self>
[src]
Attempt to perform schema resolution on the value, with the given Schema.
See Schema Resolution in the Avro specification for the full set of rules of schema resolution.
Trait Implementations
impl Clone for Value
[src]
impl Debug for Value
[src]
impl From<&'_ [u8]> for Value
[src]
impl From<&'_ str> for Value
[src]
impl<'_enum> From<&'_enum Value> for ValueKind
[src]
impl<'a> From<&'a Value> for SchemaKind
[src]
impl From<()> for Value
[src]
impl From<Codec> for Value
[src]
impl From<Decimal> for Value
[src]
impl From<Duration> for Value
[src]
impl<K, V, S> From<HashMap<K, V, S>> for Value where
K: Into<String>,
V: Into<Self>,
S: BuildHasher,
[src]
K: Into<String>,
V: Into<Self>,
S: BuildHasher,
impl<T> From<Option<T>> for Value where
T: Into<Self>,
[src]
T: Into<Self>,
impl<'a> From<Record<'a>> for Value
[src]
impl From<String> for Value
[src]
impl From<Uuid> for Value
[src]
impl From<Value> for ValueKind
[src]
impl From<Value> for Value
[src]
impl From<Vec<u8, Global>> for Value
[src]
impl From<bool> for Value
[src]
impl From<f32> for Value
[src]
impl From<f64> for Value
[src]
impl From<i32> for Value
[src]
impl From<i64> for Value
[src]
impl From<usize> for Value
[src]
impl PartialEq<Value> for Value
[src]
impl StructuralPartialEq for Value
[src]
Auto Trait Implementations
impl RefUnwindSafe for Value
[src]
impl Send for Value
[src]
impl Sync for Value
[src]
impl Unpin for Value
[src]
impl UnwindSafe for Value
[src]
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,
pub 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> Same<T> for T
type Output = T
Should always be Self
impl<T> ToAvro for T where
T: Into<Value>,
[src]
T: Into<Value>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,