Struct fastlib::TextMessageFactory

source ·
pub struct TextMessageFactory {
    pub text: String,
    /* private fields */
}
Expand description

Message factory implementation that formats decoded messages as a human-readable text.

Fields§

§text: String

Implementations§

source§

impl TextMessageFactory

source

pub fn new() -> Self

Creates a new message factory.

source

pub fn reset(&mut self)

Resets the state of the message factory. Called everytime a new message decoding started.

Trait Implementations§

source§

impl MessageFactory for TextMessageFactory

source§

fn start_template(&mut self, _id: u32, name: &str)

Called when a <template> processing is started. Read more
source§

fn stop_template(&mut self)

Called when a <template> processing is finished.
source§

fn set_value(&mut self, _id: u32, name: &str, value: Option<Value>)

Called when a field element is processed. Read more
source§

fn start_sequence(&mut self, _id: u32, name: &str, _length: u32)

Called when a <sequence> element processing is started. Read more
source§

fn start_sequence_item(&mut self, _index: u32)

Called when a sequence item processing is started. Read more
source§

fn stop_sequence_item(&mut self)

Called when a sequence item processing is finished.
source§

fn stop_sequence(&mut self)

Called when a <sequence> processing is finished.
source§

fn start_group(&mut self, name: &str)

Called when a <group> element processing is started. Read more
source§

fn stop_group(&mut self)

Called when a <group> element processing is finished.
source§

fn start_template_ref(&mut self, name: &str, dynamic: bool)

Called when a template reference (<templateRef>) processing is started. Read more
source§

fn stop_template_ref(&mut self)

Called when a template reference (<templateRef>) processing is finished.

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

§

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

§

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.