pub trait Attachable: Sized {
    const MODULE_ID: AttachedModuleId;

    // Required methods
    fn new(handle: ModuleHandle) -> Self;
    fn handle(&self) -> &ModuleHandle;

    // Provided methods
    fn attached(address: GlobalAddress) -> Self { ... }
    fn self_attached() -> Self { ... }
    fn call<A: ScryptoEncode, T: ScryptoDecode>(
        &self,
        method: &str,
        args: &A
    ) -> T { ... }
    fn call_raw(&self, method: &str, args: Vec<u8>) -> Vec<u8>  { ... }
    fn call_ignore_rtn<A: ScryptoEncode>(&self, method: &str, args: &A) { ... }
}

Required Associated Constants§

Required Methods§

source

fn new(handle: ModuleHandle) -> Self

source

fn handle(&self) -> &ModuleHandle

Provided Methods§

source

fn attached(address: GlobalAddress) -> Self

source

fn self_attached() -> Self

source

fn call<A: ScryptoEncode, T: ScryptoDecode>(&self, method: &str, args: &A) -> T

source

fn call_raw(&self, method: &str, args: Vec<u8>) -> Vec<u8>

source

fn call_ignore_rtn<A: ScryptoEncode>(&self, method: &str, args: &A)

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Attachable for Metadata

source§

const MODULE_ID: AttachedModuleId = AttachedModuleId::Metadata

source§

impl Attachable for RoleAssignment

source§

const MODULE_ID: AttachedModuleId = AttachedModuleId::RoleAssignment

source§

impl Attachable for Royalty

source§

const MODULE_ID: AttachedModuleId = AttachedModuleId::Royalty