Struct fefix::tagvalue::Encoder[][src]

pub struct Encoder<C = Config> where
    C: Configure
{ /* fields omitted */ }
Expand description

A buffered, content-agnostic FIX encoder.

Encoder is the fundamental building block for building higher-level FIX encoders. It allows for encoding of arbitrary payloads and takes care of BodyLength (9) and CheckSum (10).

Examples

use fefix::tagvalue::{Config, Encoder};

let mut buffer = Vec::new();
let mut encoder = Encoder::<Config>::default();
encoder.config_mut().set_separator(b'|');
let msg = encoder.start_message(b"FIX.4.4", &mut buffer, b"A");
let data = msg.wrap();

Implementations

Creates a new Encoder from the given config options.

Examples
use fefix::tagvalue::{Config, Configure, Encoder};

let mut config = Config::default();
config.set_separator(b'|');
let encoder = Encoder::new(config);
assert_eq!(encoder.config().separator(), b'|');

Returns an immutable reference to the Configure implementor used by self.

Returns a mutable reference to the Configure implementor used by self.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.