carbon-memo-program-decoder 1.0.0

Memo Program Decoder
Documentation
//! This code was AUTOGENERATED using the Codama library.

use super::MemoProgramAccount;

pub struct MemoProgramAccountsMigration;

impl sqlx_migrator::Migration<sqlx::Postgres> for MemoProgramAccountsMigration {
    fn app(&self) -> &str {
        "memo-program"
    }

    fn name(&self) -> &str {
        "memo_program_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 MemoProgramAccountWithMetadata(
    pub MemoProgramAccount,
    pub carbon_core::account::AccountMetadata,
);

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

#[async_trait::async_trait]
impl carbon_core::postgres::operations::Insert for MemoProgramAccountWithMetadata {
    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 MemoProgramAccountWithMetadata {
    async fn upsert(&self, _pool: &sqlx::PgPool) -> carbon_core::error::CarbonResult<()> {
        unreachable!("No accounts to decode")
    }
}