pub trait ControlStateWriteAccess: Send + Sync {
    // Required methods
    fn create_address<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Address>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn publish_database<'life0, 'life1, 'async_trait>(
        &'life0 self,
        identity: &'life1 Identity,
        publisher_address: Option<Address>,
        spec: DatabaseDef
    ) -> Pin<Box<dyn Future<Output = Result<Option<UpdateDatabaseResult>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn delete_database<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        identity: &'life1 Identity,
        address: &'life2 Address
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn create_identity<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Identity>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn add_email<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        identity: &'life1 Identity,
        email: &'life2 str
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn insert_recovery_code<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        identity: &'life1 Identity,
        email: &'life2 str,
        code: RecoveryCode
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn add_energy<'life0, 'life1, 'async_trait>(
        &'life0 self,
        identity: &'life1 Identity,
        amount: EnergyQuanta
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn withdraw_energy<'life0, 'life1, 'async_trait>(
        &'life0 self,
        identity: &'life1 Identity,
        amount: EnergyQuanta
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn register_tld<'life0, 'life1, 'async_trait>(
        &'life0 self,
        identity: &'life1 Identity,
        tld: Tld
    ) -> Pin<Box<dyn Future<Output = Result<RegisterTldResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn create_dns_record<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        identity: &'life1 Identity,
        domain: &'life2 DomainName,
        address: &'life3 Address
    ) -> Pin<Box<dyn Future<Output = Result<InsertDomainResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
}
Expand description

Write operations on the SpacetimeDB control plane.

Required Methods§

source

fn create_address<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Address>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn publish_database<'life0, 'life1, 'async_trait>( &'life0 self, identity: &'life1 Identity, publisher_address: Option<Address>, spec: DatabaseDef ) -> Pin<Box<dyn Future<Output = Result<Option<UpdateDatabaseResult>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Publish a database acc. to DatabaseDef.

If the database with the given address was successfully published before, it is updated acc. to the module lifecycle conventions. Some result is returned in that case.

Otherwise, None is returned meaning that the database was freshly initialized.

source

fn delete_database<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, identity: &'life1 Identity, address: &'life2 Address ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source

fn create_identity<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Identity>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn add_email<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, identity: &'life1 Identity, email: &'life2 str ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source

fn insert_recovery_code<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, identity: &'life1 Identity, email: &'life2 str, code: RecoveryCode ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source

fn add_energy<'life0, 'life1, 'async_trait>( &'life0 self, identity: &'life1 Identity, amount: EnergyQuanta ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn withdraw_energy<'life0, 'life1, 'async_trait>( &'life0 self, identity: &'life1 Identity, amount: EnergyQuanta ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn register_tld<'life0, 'life1, 'async_trait>( &'life0 self, identity: &'life1 Identity, tld: Tld ) -> Pin<Box<dyn Future<Output = Result<RegisterTldResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn create_dns_record<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, identity: &'life1 Identity, domain: &'life2 DomainName, address: &'life3 Address ) -> Pin<Box<dyn Future<Output = Result<InsertDomainResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Implementations on Foreign Types§

source§

impl<T: ControlStateWriteAccess + ?Sized> ControlStateWriteAccess for Arc<T>

source§

fn create_address<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Address>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn publish_database<'life0, 'life1, 'async_trait>( &'life0 self, identity: &'life1 Identity, publisher_address: Option<Address>, spec: DatabaseDef ) -> Pin<Box<dyn Future<Output = Result<Option<UpdateDatabaseResult>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn delete_database<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, identity: &'life1 Identity, address: &'life2 Address ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source§

fn create_identity<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Identity>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn add_email<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, identity: &'life1 Identity, email: &'life2 str ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source§

fn insert_recovery_code<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, identity: &'life1 Identity, email: &'life2 str, code: RecoveryCode ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source§

fn add_energy<'life0, 'life1, 'async_trait>( &'life0 self, identity: &'life1 Identity, amount: EnergyQuanta ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn withdraw_energy<'life0, 'life1, 'async_trait>( &'life0 self, identity: &'life1 Identity, amount: EnergyQuanta ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn register_tld<'life0, 'life1, 'async_trait>( &'life0 self, identity: &'life1 Identity, tld: Tld ) -> Pin<Box<dyn Future<Output = Result<RegisterTldResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn create_dns_record<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, identity: &'life1 Identity, domain: &'life2 DomainName, address: &'life3 Address ) -> Pin<Box<dyn Future<Output = Result<InsertDomainResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Implementors§