Struct DecoderBuffered

Source
pub struct DecoderBuffered<C = Config> { /* private fields */ }
Expand description

A (de)serializer for the classic FIX tag-value encoding.

The FIX tag-value encoding is designed to be both human-readable and easy for machines to parse.

Please reach out to the FIX official documentation12 for more information.

Implementations§

Source§

impl<C> DecoderBuffered<C>
where C: Configure,

Source

pub fn supply_buffer(&mut self) -> &mut [u8]

Provides a buffer that must be filled before re-attempting to deserialize the next Message.

DecoderBuffered::supply_buffer is guaranteed to be non-empty.

§Panics

Panics if the last call to DecoderBuffered::parse returned an Err.

Source

pub fn clear(&mut self)

Completes erases the contents of the internal buffer of self.

Source

pub fn parse(&mut self) -> Result<Option<()>, DecodeError>

After filling the buffer provided by DecoderBuffered::supply_buffer, attempt to read its contents. It returns:

Source

pub fn message(&self) -> Message<'_, &[u8]>

§Panics

Panics if DecoderBuffered::parse() didn’t return [Ok(Some(()))].

Trait Implementations§

Source§

impl<C: Debug> Debug for DecoderBuffered<C>

Source§

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

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

impl<C> GetConfig for DecoderBuffered<C>

Source§

type Config = C

The configuration options type.
Source§

fn config(&self) -> &Self::Config

Returns an immutable reference to the configuration options used by self.
Source§

fn config_mut(&mut self) -> &mut Self::Config

Returns a mutable reference to the configuration options used by self.

Auto Trait Implementations§

§

impl<C> Freeze for DecoderBuffered<C>
where C: Freeze,

§

impl<C = Config> !RefUnwindSafe for DecoderBuffered<C>

§

impl<C> Send for DecoderBuffered<C>
where C: Send,

§

impl<C> Sync for DecoderBuffered<C>
where C: Sync,

§

impl<C> Unpin for DecoderBuffered<C>
where C: Unpin,

§

impl<C = Config> !UnwindSafe for DecoderBuffered<C>

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.