Skip to main content

AvroEngine

Struct AvroEngine 

Source
pub struct AvroEngine;
Expand description

Format engine for Apache Avro binary payloads (.avro).

Trait Implementations§

Source§

impl Clone for AvroEngine

Source§

fn clone(&self) -> AvroEngine

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for AvroEngine

Source§

impl Debug for AvroEngine

Source§

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

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

impl Default for AvroEngine

Source§

fn default() -> AvroEngine

Returns the “default value” for a type. Read more
Source§

impl FormatEngine for AvroEngine

Source§

fn format_id(&self) -> &'static str

Unique format identifier (e.g., “json”, “yaml”, “toml”, “xml”, “bencode”).
Source§

fn mime_type(&self) -> &'static str

Canonical MIME type (e.g., “application/json”).
Source§

fn file_extensions(&self) -> &'static [&'static str]

Associated file extensions without leading dots (e.g., &[“json”, “jsonl”]).
Source§

fn parse_str(&self, input: &str) -> Result<Value, BabbelError>

Convenient parsing from UTF-8 text string.
Source§

fn parse_bytes(&self, input: &[u8]) -> Result<Value, BabbelError>

Convenient parsing from raw byte slice.
Source§

fn serialize( &self, value: &Value, dest: &mut dyn IDestination, _options: &FormatOptions, ) -> Result<(), BabbelError>

Serialize universal Value AST into output destination with format options.
Source§

fn is_binary(&self) -> bool

Whether this format is binary-encoded rather than UTF-8 text (default: false).
Source§

fn parse(&self, source: &mut dyn ISource) -> Result<Value, BabbelError>

Parse raw stream into universal Value AST. Read more
Source§

fn serialize_to_string( &self, value: &Value, options: &FormatOptions, ) -> Result<String, BabbelError>

Convenient serialization to String.
Source§

fn serialize_to_vec( &self, value: &Value, options: &FormatOptions, ) -> Result<Vec<u8>, BabbelError>

Convenient serialization to bytes.
Source§

fn parse_documents(&self, input: &str) -> Result<Vec<Value>, BabbelError>

Parses one or more documents from a string stream (e.g. multi-doc YAML or JSON Lines).
Source§

fn parse_documents_bytes(&self, input: &[u8]) -> Result<Vec<Value>, BabbelError>

Parses one or more documents from a byte stream (e.g. RFC 8742 CBOR Sequences).

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> FormatCodec for T
where T: FormatEngine + ?Sized,

Source§

fn format_name(&self) -> &'static str

Returns the name of the format (e.g., “json”, “yaml”, “xml”, “bencode”).
Source§

impl<T> FormatEmitter for T
where T: FormatEngine + ?Sized,

Source§

fn emit( &self, value: &Value, dest: &mut dyn IDestination, ) -> Result<(), BabbelError>

Serializes a Value to the output destination in compact/standard format.
Source§

fn emit_pretty( &self, value: &Value, dest: &mut dyn IDestination, indent: usize, ) -> Result<(), BabbelError>

Serializes a Value to the output destination with pretty printing.
Source§

impl<T> FormatParser for T
where T: FormatEngine + ?Sized,

Source§

fn parse_str(&self, input: &str) -> Result<Value, BabbelError>

Parses a UTF-8 string into a universal Value.
Source§

fn parse_bytes(&self, input: &[u8]) -> Result<Value, BabbelError>

Parses a raw byte slice into a universal Value.
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> ToOwned for T
where T: Clone,

Source§

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>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.