Function get_age_since_created

Source
pub fn get_age_since_created(
    tx: &TransactionRepoModel,
) -> Result<Duration, TransactionError>
Expand description

Gets the age of a transaction since it was created.

§Arguments

  • tx - The transaction repository model

§Returns

A Result containing the Duration since the transaction was created, or a TransactionError if the created_at timestamp cannot be parsed.