Skip to main content

FedNowValidator

Struct FedNowValidator 

Source
pub struct FedNowValidator { /* private fields */ }
Expand description

FedNow scheme validator.

§Examples

use mx20022_validate::schemes::fednow::FedNowValidator;
use mx20022_validate::schemes::SchemeValidator;

let validator = FedNowValidator::new();
assert_eq!(validator.name(), "FedNow");
assert!(validator.supported_messages().contains(&"pacs.008"));

Implementations§

Source§

impl FedNowValidator

Source

pub fn new() -> Self

Create a validator with the standard 500,000 USD limit.

Source

pub fn with_max_amount(max_amount: f64) -> Self

Create a validator with a custom maximum amount (e.g. 25,000,000 USD for high-value participants).

§Panics

Panics if max_amount is not positive or not finite.

Trait Implementations§

Source§

impl Default for FedNowValidator

Source§

fn default() -> Self

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

impl SchemeValidator for FedNowValidator

Source§

fn name(&self) -> &'static str

Human-readable name of the scheme (e.g. "FedNow", "SEPA", "CBPR+").
Source§

fn supported_messages(&self) -> &[&str]

Short message type identifiers supported by this scheme. Read more
Source§

fn validate(&self, xml: &str, message_type: &str) -> ValidationResult

Validate raw XML content against this scheme’s rules. Read more
Source§

fn validate_typed( &self, msg: &dyn Any, message_type: &str, ) -> Option<ValidationResult>

Validate a typed (deserialized) message against this scheme’s rules. Read more

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

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.