[−][src]Struct avrow::Record
The record avro type
Implementations
impl Record
[src]
pub fn new(name: &str) -> Self
[src]
Creates a new avro record type with the given name.
pub fn insert<T: Into<Value>>(
&mut self,
field_name: &str,
ty: T
) -> Result<(), AvrowErr>
[src]
&mut self,
field_name: &str,
ty: T
) -> Result<(), AvrowErr>
Adds a field to the record.
pub fn set_field_order(
&mut self,
field_name: &str,
order: Order
) -> Result<(), AvrowErr>
[src]
&mut self,
field_name: &str,
order: Order
) -> Result<(), AvrowErr>
Sets the ordering of the field.
pub fn from_btree<K: Into<String> + Ord + Display, V: Into<Value>>(
name: &str,
btree: BTreeMap<K, V>
) -> Result<Self, AvrowErr>
[src]
name: &str,
btree: BTreeMap<K, V>
) -> Result<Self, AvrowErr>
Creates a record from a BTreeMap by consuming it.
The values in btree must implement Into
pub fn from_json(
json: Map<String, Value>,
schema: &Schema
) -> Result<Value, AvrowErr>
[src]
json: Map<String, Value>,
schema: &Schema
) -> Result<Value, AvrowErr>
Creates a record from a json object. A confirming record schema must be provided.
Trait Implementations
impl Clone for Record
[src]
impl Debug for Record
[src]
impl PartialEq<Record> for Record
[src]
impl Serialize for Record
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for Record
[src]
Auto Trait Implementations
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnwindSafe for Record
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>,