pub struct MsgPackEngine;Expand description
MessagePack format engine implementing FormatEngine.
Trait Implementations§
Source§impl Clone for MsgPackEngine
impl Clone for MsgPackEngine
impl Copy for MsgPackEngine
Source§impl Debug for MsgPackEngine
impl Debug for MsgPackEngine
Source§impl Default for MsgPackEngine
impl Default for MsgPackEngine
impl Eq for MsgPackEngine
Source§impl FormatEngine for MsgPackEngine
impl FormatEngine for MsgPackEngine
Source§fn format_id(&self) -> &'static str
fn format_id(&self) -> &'static str
Unique format identifier (e.g., “json”, “yaml”, “toml”, “xml”, “bencode”).
Source§fn file_extensions(&self) -> &'static [&'static str]
fn file_extensions(&self) -> &'static [&'static str]
Associated file extensions without leading dots (e.g., &[“json”, “jsonl”]).
Source§fn is_binary(&self) -> bool
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>
fn parse(&self, source: &mut dyn ISource) -> Result<Value, BabbelError>
Parse raw stream into universal Value AST. Read more
Source§fn parse_bytes(&self, input: &[u8]) -> Result<Value, BabbelError>
fn parse_bytes(&self, input: &[u8]) -> Result<Value, BabbelError>
Convenient parsing from raw byte slice.
Source§fn serialize(
&self,
value: &Value,
destination: &mut dyn IDestination,
_options: &FormatOptions,
) -> Result<(), BabbelError>
fn serialize( &self, value: &Value, destination: &mut dyn IDestination, _options: &FormatOptions, ) -> Result<(), BabbelError>
Serialize universal Value AST into output destination with format options.
Source§fn parse_str(&self, input: &str) -> Result<Value, BabbelError>
fn parse_str(&self, input: &str) -> Result<Value, BabbelError>
Convenient parsing from UTF-8 text string.
Source§fn serialize_to_string(
&self,
value: &Value,
options: &FormatOptions,
) -> Result<String, BabbelError>
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>
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>
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>
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).
Source§impl PartialEq for MsgPackEngine
impl PartialEq for MsgPackEngine
impl StructuralPartialEq for MsgPackEngine
Auto Trait Implementations§
impl Freeze for MsgPackEngine
impl RefUnwindSafe for MsgPackEngine
impl Send for MsgPackEngine
impl Sync for MsgPackEngine
impl Unpin for MsgPackEngine
impl UnsafeUnpin for MsgPackEngine
impl UnwindSafe for MsgPackEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FormatCodec for Twhere
T: FormatEngine + ?Sized,
impl<T> FormatCodec for Twhere
T: FormatEngine + ?Sized,
Source§fn format_name(&self) -> &'static str
fn format_name(&self) -> &'static str
Returns the name of the format (e.g., “json”, “yaml”, “xml”, “bencode”).
Source§impl<T> FormatEmitter for Twhere
T: FormatEngine + ?Sized,
impl<T> FormatEmitter for Twhere
T: FormatEngine + ?Sized,
Source§fn emit(
&self,
value: &Value,
dest: &mut dyn IDestination,
) -> Result<(), BabbelError>
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>
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 Twhere
T: FormatEngine + ?Sized,
impl<T> FormatParser for Twhere
T: FormatEngine + ?Sized,
Source§fn parse_str(&self, input: &str) -> Result<Value, BabbelError>
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>
fn parse_bytes(&self, input: &[u8]) -> Result<Value, BabbelError>
Parses a raw byte slice into a universal
Value.