Skip to main content

ValidationError

Enum ValidationError 

Source
pub enum ValidationError {
Show 16 variants UnknownField(String), UnknownComponent(String), DuplicatedField(String), DuplicatedComponent(String), DuplicatedGroup(String), DuplicatedMessageName(String), DuplicatedMessageType(MsgType), EmptyContainer(String), EmptyMessage(String), UnexpectedMessageCategory(MsgCat, String), UnusedField(String, u16), UnusedComponent(String), MissingRequiredField(String, u16), OptionalRequiredField(String, u16), InvalidRequiredField(String, u16, BasicType), CircularReference(String),
}
Expand description

Errors related to dictionary structure and content validation.

These errors indicate problems with the dictionary’s structure, such as missing references, duplicates, or invalid relationships between elements.

Variants§

§

UnknownField(String)

Referenced field was not found in the dictionary

§

UnknownComponent(String)

Referenced component was not found in the dictionary

§

DuplicatedField(String)

A field with the same name already exists in the dictionary

§

DuplicatedComponent(String)

A component with the same name already exists in the dictionary

§

DuplicatedGroup(String)

A group with the same name already exists in the dictionary

§

DuplicatedMessageName(String)

A message with the same name already exists in the dictionary

§

DuplicatedMessageType(MsgType)

A message with the same type already exists in the dictionary

§

EmptyContainer(String)

Component or group has no members defined

§

EmptyMessage(String)

Message has no fields or components defined

§

UnexpectedMessageCategory(MsgCat, String)

Message has an unexpected category for this dictionary type

§

UnusedField(String, u16)

Field was defined in the dictionary but not used in any message, component, or group

This error only occurs when strict validation is enabled with with_strict_check(true).

§

UnusedComponent(String)

Component was defined in the dictionary but not used in any message or other component

This error only occurs when strict validation is enabled with with_strict_check(true).

§

MissingRequiredField(String, u16)

A field the standard header/trailer must carry is not defined there

This error only occurs when strict validation is enabled with with_strict_check(true).

§

OptionalRequiredField(String, u16)

A field the standard header/trailer must carry is declared optional

This error only occurs when strict validation is enabled with with_strict_check(true).

§

InvalidRequiredField(String, u16, BasicType)

A required standard field in the header/trailer has incorrect properties

This error occurs when a required FIX field (like BeginString or BodyLength) is defined with the wrong tag number or data type, or - for the fields whose position is mandated - does not sit where it must. This error only occurs when strict validation is enabled with with_strict_check(true).

§

CircularReference(String)

A circular dependency was detected in component or group references

This error occurs when components or groups reference each other in a way that creates an infinite loop. For example, if Component A contains Component B, and Component B contains Component A, this would create a circular reference.

Trait Implementations§

Source§

impl Debug for ValidationError

Source§

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

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

impl Display for ValidationError

Source§

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

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

impl Error for ValidationError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<ValidationError> for Error

Source§

fn from(source: ValidationError) -> Self

Converts to this type from the input type.

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.