pub trait TokenInterface {
const ID: Address;
// Provided method
fn verify(address: &Address) -> ProgramResult { ... }
}Expand description
A trait for token programs that can be used in a CPI with a statically known program address.
Required Associated Constants§
Provided Methods§
Sourcefn verify(address: &Address) -> ProgramResult
fn verify(address: &Address) -> ProgramResult
Returns Ok(()) when address is accepted for cross-program
invocations.
Instructions may accept addresses other than Self::ID when a
compatible program can process the same instruction layout.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".