[−][src]Enum avrow::Value
Represents an Avro value
Variants
A null value.
Int(i32)
An i32 integer value.
Long(i64)
An i64 long value.
Boolean(bool)
A boolean value.
Float(f32)
A f32 float value.
Double(f64)
A f64 float value.
Record(Record)
A Record value (BTreeMap<String, Value>).
A Fixed value.
A Map value.
A sequence of u8 bytes.
Str(String)
Rust strings map directly to avro strings
A union is a sequence of unique Value
s
Enum(String)
An enumeration. Unlike Rust enums, enums in avro don't support data within their variants.
An array of Value
s
Byte(u8)
auxiliary u8 helper for serde. Not an avro value.
Implementations
impl Value
[src]
Value -> Rust value
pub fn as_null(&self) -> Result<(), AvrowErr>
[src]
Try to retrieve an avro null
pub fn as_boolean(&self) -> Result<&bool, AvrowErr>
[src]
Try to retrieve an avro boolean
pub fn as_int(&self) -> Result<&i32, AvrowErr>
[src]
Try to retrieve an avro int
pub fn as_long(&self) -> Result<&i64, AvrowErr>
[src]
Try to retrieve an avro long
pub fn as_float(&self) -> Result<&f32, AvrowErr>
[src]
Try to retrieve an avro float
pub fn as_double(&self) -> Result<&f64, AvrowErr>
[src]
Try to retrieve an avro double
pub fn as_bytes(&self) -> Result<&[u8], AvrowErr>
[src]
Try to retrieve an avro bytes
pub fn as_string(&self) -> Result<&str, AvrowErr>
[src]
Try to retrieve an avro string
pub fn as_record(&self) -> Result<&Record, AvrowErr>
[src]
Try to retrieve an avro record
pub fn as_enum(&self) -> Result<&str, AvrowErr>
[src]
Try to retrieve the variant of the enum as a string
pub fn as_array(&self) -> Result<&[Value], AvrowErr>
[src]
Try to retrieve an avro array
pub fn as_map(&self) -> Result<&HashMap<String, Value>, AvrowErr>
[src]
Try to retrieve an avro map
pub fn as_union(&self) -> Result<&Value, AvrowErr>
[src]
Try to retrieve an avro union
pub fn as_fixed(&self) -> Result<&[u8], AvrowErr>
[src]
Try to retrieve an avro fixed
Trait Implementations
impl Clone for Value
[src]
impl Debug for Value
[src]
impl<'a> From<&'a [u8]> for Value
[src]
impl<'a> From<&'a str> for Value
[src]
impl From<()> for Value
[src]
From impls for Value
impl<T: Into<Value>> From<HashMap<String, T, RandomState>> for Value
[src]
impl From<String> for Value
[src]
impl<T: Into<Value>> From<Vec<T>> for Value
[src]
impl From<Vec<u8>> 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<isize> for Value
[src]
impl From<u64> for Value
[src]
impl From<usize> for Value
[src]
impl PartialEq<Value> for Value
[src]
impl Serialize for Value
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for Value
[src]
Auto Trait Implementations
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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, 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>,