Trait fadroma::core::addr::MaybeAddress
source · pub trait MaybeAddress: Sealed { }
Expand description
Sealed marker trait for types that may represent
an address. The types that may be a valid address are
&str
and String
since they could potentially contain
an address. We use cosmwasm_std::Api::addr_validate
or
cosmwasm_std::Api::addr_canonicalize
to turn them into
cosmwasm_std::Addr
and cosmwasm_std::CanonicalAddr
respectively, both of which definitely do contain
a valid address and therefore also satisfy this trait.
If you want to constrain your type to contain valid
addresses only, use Address
instead.