fn contract_or_err(&self) -> Result<&ContractAccount> {
        match &self.kind {
            AccountKind::User => {
                Err(AccountError::UnexpectedUserAccount).map_err(Into::into)
            }
            AccountKind::Contract(contract_account) => Ok(contract_account),
        }
    }
/// Returns the contract account or an error if it is a user account.
Returns the contract account or an error if it is a user account.
Returns the contract account or an error if it is a user account .
fn contract_or_err(&self) -> Result<&ContractAccount> {
        match &self.kind {
            AccountKind::User => {
                Err(AccountError::UnexpectedUserAccount).map_err(Into::into)
            }
            AccountKind::Contract(contract_account) => Ok(contract_account),
        }
    }
fn contract_or_err ( & self ) -> Result < & ContractAccount > { match & self . kind { AccountKind :: User => { Err ( AccountError :: UnexpectedUserAccount ) . map_err ( Into :: into ) } AccountKind :: Contract ( contract_account ) => Ok ( contract_account ) , } }
Returns the contract account or an error if it is a user account.
Returns the contract account or an error if it is a user account .
&self
&self