pub struct ValidationRegistry { /* private fields */ }Expand description
Registry for CAIP-specific validation functions
Implementations§
Source§impl ValidationRegistry
impl ValidationRegistry
Sourcepub fn new_with_defaults() -> Self
pub fn new_with_defaults() -> Self
Create a new validation registry with default validators
Sourcepub fn register_chain_validator(
&mut self,
namespace: &str,
validator: ValidatorFn,
)
pub fn register_chain_validator( &mut self, namespace: &str, validator: ValidatorFn, )
Register a validator for chain IDs with the specified namespace
Sourcepub fn register_account_validator(
&mut self,
namespace: &str,
validator: ValidatorFn,
)
pub fn register_account_validator( &mut self, namespace: &str, validator: ValidatorFn, )
Register a validator for account addresses with the specified chain namespace
Sourcepub fn register_asset_validator(
&mut self,
namespace: &str,
validator: ValidatorFn,
)
pub fn register_asset_validator( &mut self, namespace: &str, validator: ValidatorFn, )
Register a validator for asset references with the specified asset namespace
Sourcepub fn get_chain_validator(&self, namespace: &str) -> Option<ValidatorFn>
pub fn get_chain_validator(&self, namespace: &str) -> Option<ValidatorFn>
Get a validator for chain IDs with the specified namespace
Sourcepub fn get_account_validator(&self, namespace: &str) -> Option<ValidatorFn>
pub fn get_account_validator(&self, namespace: &str) -> Option<ValidatorFn>
Get a validator for account addresses with the specified chain namespace
Sourcepub fn get_asset_validator(&self, namespace: &str) -> Option<ValidatorFn>
pub fn get_asset_validator(&self, namespace: &str) -> Option<ValidatorFn>
Get a validator for asset references with the specified asset namespace
Trait Implementations§
Source§impl Debug for ValidationRegistry
impl Debug for ValidationRegistry
Auto Trait Implementations§
impl Freeze for ValidationRegistry
impl RefUnwindSafe for ValidationRegistry
impl Send for ValidationRegistry
impl Sync for ValidationRegistry
impl Unpin for ValidationRegistry
impl UnwindSafe for ValidationRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more