carbon-sharky-decoder 2.0.0

Sharky Decoder
Documentation
//! This code was AUTOGENERATED using the Codama library.
use {carbon_core::graphql::primitives::U8, juniper::GraphQLObject};

#[derive(Debug, Clone, GraphQLObject)]
#[graphql(name = "EscrowPDA")]
pub struct EscrowPDAGraphQL {
    pub account_metadata: crate::accounts::graphql::AccountMetadataGraphQL,
    pub bump: U8,
}

impl TryFrom<crate::accounts::postgres::EscrowPDARow> for EscrowPDAGraphQL {
    type Error = carbon_core::error::Error;
    fn try_from(row: crate::accounts::postgres::EscrowPDARow) -> Result<Self, Self::Error> {
        Ok(Self {
            account_metadata: row.account_metadata.into(),
            bump: carbon_core::graphql::primitives::U8((*row.bump) as u8),
        })
    }
}