pub struct Validator;Expand description
Validation utilities for blockchain data.
Implementations§
Source§impl Validator
impl Validator
Sourcepub fn validate_address(address: &str) -> Result<()>
pub fn validate_address(address: &str) -> Result<()>
Validate an Ethereum-style address (42 characters, starts with 0x).
Sourcepub fn validate_tx_hash(tx_hash: &str) -> Result<()>
pub fn validate_tx_hash(tx_hash: &str) -> Result<()>
Validate a transaction hash (66 characters, starts with 0x).
Sourcepub fn validate_chain_name(chain_name: &str) -> Result<()>
pub fn validate_chain_name(chain_name: &str) -> Result<()>
Validate a chain name/identifier.
Sourcepub fn validate_page_size(page_size: u32) -> Result<()>
pub fn validate_page_size(page_size: u32) -> Result<()>
Validate page size parameter.
Sourcepub fn validate_api_key(api_key: &str) -> Result<()>
pub fn validate_api_key(api_key: &str) -> Result<()>
Validate an API key format.
Sourcepub fn validate_nft_identifier(
contract_address: &str,
token_id: &str,
) -> Result<()>
pub fn validate_nft_identifier( contract_address: &str, token_id: &str, ) -> Result<()>
Validate contract address and token ID combination.
Sourcepub fn validate_url(url: &str) -> Result<()>
pub fn validate_url(url: &str) -> Result<()>
Validate URL format.
Auto Trait Implementations§
impl Freeze for Validator
impl RefUnwindSafe for Validator
impl Send for Validator
impl Sync for Validator
impl Unpin for Validator
impl UnwindSafe for Validator
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