pub trait SubscriptionModule: ContractBase + Sized {
// Required method
fn subscription_update_event(
&self,
token_id: &ManagedBuffer<Self::Api>,
token_nonce: u64,
expiration: u64,
);
// Provided methods
fn create_subscription_nft<T: NestedEncode + NestedDecode + TypeAbi>(
&self,
token_id: &TokenIdentifier<Self::Api>,
amount: &BigUint<Self::Api>,
name: &ManagedBuffer<Self::Api>,
royalties: &BigUint<Self::Api>,
hash: &ManagedBuffer<Self::Api>,
duration: u64,
attributes: T,
uris: &ManagedVec<Self::Api, ManagedBuffer<Self::Api>>,
) -> u64 { ... }
fn update_subscription_attributes<T: NestedEncode + NestedDecode + TypeAbi>(
&self,
id: &TokenIdentifier<Self::Api>,
nonce: u64,
attributes: T,
) { ... }
fn get_subscription_attributes<T: NestedEncode + NestedDecode + TypeAbi>(
&self,
id: &TokenIdentifier<Self::Api>,
nonce: u64,
) -> T { ... }
fn renew_subscription<T: NestedEncode + NestedDecode + TypeAbi>(
&self,
id: &TokenIdentifier<Self::Api>,
nonce: u64,
duration: u64,
) { ... }
fn cancel_subscription<T: NestedEncode + NestedDecode + TypeAbi>(
&self,
id: &TokenIdentifier<Self::Api>,
nonce: u64,
) { ... }
fn get_subscription<T: NestedEncode + NestedDecode + TypeAbi>(
&self,
id: &TokenIdentifier<Self::Api>,
nonce: u64,
) -> u64 { ... }
}
Required Methods§
fn subscription_update_event( &self, token_id: &ManagedBuffer<Self::Api>, token_nonce: u64, expiration: u64, )
Provided Methods§
fn create_subscription_nft<T: NestedEncode + NestedDecode + TypeAbi>( &self, token_id: &TokenIdentifier<Self::Api>, amount: &BigUint<Self::Api>, name: &ManagedBuffer<Self::Api>, royalties: &BigUint<Self::Api>, hash: &ManagedBuffer<Self::Api>, duration: u64, attributes: T, uris: &ManagedVec<Self::Api, ManagedBuffer<Self::Api>>, ) -> u64
fn update_subscription_attributes<T: NestedEncode + NestedDecode + TypeAbi>( &self, id: &TokenIdentifier<Self::Api>, nonce: u64, attributes: T, )
fn get_subscription_attributes<T: NestedEncode + NestedDecode + TypeAbi>( &self, id: &TokenIdentifier<Self::Api>, nonce: u64, ) -> T
fn renew_subscription<T: NestedEncode + NestedDecode + TypeAbi>( &self, id: &TokenIdentifier<Self::Api>, nonce: u64, duration: u64, )
fn cancel_subscription<T: NestedEncode + NestedDecode + TypeAbi>( &self, id: &TokenIdentifier<Self::Api>, nonce: u64, )
fn get_subscription<T: NestedEncode + NestedDecode + TypeAbi>( &self, id: &TokenIdentifier<Self::Api>, nonce: u64, ) -> u64
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.