carbon-okx-dex-decoder 2.0.0

OKX DEX Decoder
Documentation
//! This code was AUTOGENERATED using the Codama library.

use super::OkxDexAccount;

pub struct OkxDexAccountsMigration;

impl sqlx_migrator::Migration<sqlx::Postgres> for OkxDexAccountsMigration {
    fn app(&self) -> &str {
        "okx-dex"
    }

    fn name(&self) -> &str {
        "okx_dex_accounts"
    }

    fn operations(&self) -> Vec<Box<dyn sqlx_migrator::Operation<sqlx::Postgres>>> {
        vec![]
    }

    fn parents(&self) -> Vec<Box<dyn sqlx_migrator::Migration<sqlx::Postgres>>> {
        vec![]
    }
}

pub struct OkxDexAccountWithMetadata(pub OkxDexAccount, pub carbon_core::account::AccountMetadata);

impl From<(OkxDexAccount, carbon_core::account::AccountMetadata)> for OkxDexAccountWithMetadata {
    fn from(value: (OkxDexAccount, carbon_core::account::AccountMetadata)) -> Self {
        OkxDexAccountWithMetadata(value.0, value.1)
    }
}

#[async_trait::async_trait]
impl carbon_core::postgres::operations::Insert for OkxDexAccountWithMetadata {
    async fn insert(&self, _pool: &sqlx::PgPool) -> carbon_core::error::CarbonResult<()> {
        unreachable!("No accounts to decode")
    }
}

#[async_trait::async_trait]
impl carbon_core::postgres::operations::Upsert for OkxDexAccountWithMetadata {
    async fn upsert(&self, _pool: &sqlx::PgPool) -> carbon_core::error::CarbonResult<()> {
        unreachable!("No accounts to decode")
    }
}