Function parse

Source
pub fn parse(s: &str) -> Result<CaipId, Error>
Expand description

Attempt to parse a string as any recognized CAIP identifier

This function will try to parse the string as a ChainId, AccountId, or AssetId in that order, and return the first successful parse.

§Arguments

  • s - The string to parse

§Returns

  • Result<CaipId, Error> - The parsed CAIP identifier or an error