CreateTransferResult

Enum CreateTransferResult 

Source
#[repr(u32)]
pub enum CreateTransferResult {
Show 68 variants Ok = 0, LinkedEventFailed = 1, LinkedEventChainOpen = 2, TimestampMustBeZero = 3, ReservedFlag = 4, IdMustNotBeZero = 5, IdMustNotBeIntMax = 6, FlagsAreMutuallyExclusive = 7, DebitAccountIdMustNotBeZero = 8, DebitAccountIdMustNotBeIntMax = 9, CreditAccountIdMustNotBeZero = 10, CreditAccountIdMustNotBeIntMax = 11, AccountsMustBeDifferent = 12, PendingIdMustBeZero = 13, PendingIdMustNotBeZero = 14, PendingIdMustNotBeIntMax = 15, PendingIdMustBeDifferent = 16, TimeoutReservedForPendingTransfer = 17, LedgerMustNotBeZero = 19, CodeMustNotBeZero = 20, DebitAccountNotFound = 21, CreditAccountNotFound = 22, AccountsMustHaveTheSameLedger = 23, TransferMustHaveTheSameLedgerAsAccounts = 24, PendingTransferNotFound = 25, PendingTransferNotPending = 26, PendingTransferHasDifferentDebitAccountId = 27, PendingTransferHasDifferentCreditAccountId = 28, PendingTransferHasDifferentLedger = 29, PendingTransferHasDifferentCode = 30, ExceedsPendingTransferAmount = 31, PendingTransferHasDifferentAmount = 32, PendingTransferAlreadyPosted = 33, PendingTransferAlreadyVoided = 34, PendingTransferExpired = 35, ExistsWithDifferentFlags = 36, ExistsWithDifferentDebitAccountId = 37, ExistsWithDifferentCreditAccountId = 38, ExistsWithDifferentAmount = 39, ExistsWithDifferentPendingId = 40, ExistsWithDifferentUserData128 = 41, ExistsWithDifferentUserData64 = 42, ExistsWithDifferentUserData32 = 43, ExistsWithDifferentTimeout = 44, ExistsWithDifferentCode = 45, Exists = 46, OverflowsDebitsPending = 47, OverflowsCreditsPending = 48, OverflowsDebitsPosted = 49, OverflowsCreditsPosted = 50, OverflowsDebits = 51, OverflowsCredits = 52, OverflowsTimeout = 53, ExceedsCredits = 54, ExceedsDebits = 55, ImportedEventExpected = 56, ImportedEventNotExpected = 57, ImportedEventTimestampOutOfRange = 58, ImportedEventTimestampMustNotAdvance = 59, ImportedEventTimestampMustNotRegress = 60, ImportedEventTimestampMustPostdateDebitAccount = 61, ImportedEventTimestampMustPostdateCreditAccount = 62, ImportedEventTimeoutMustBeZero = 63, ClosingTransferMustBePending = 64, DebitAccountAlreadyClosed = 65, CreditAccountAlreadyClosed = 66, ExistsWithDifferentLedger = 67, IdAlreadyFailed = 68,
}
Expand description

Create transfer result codes.

These match the exact values from the TigerBeetle protocol.

Variants§

§

Ok = 0

Transfer created successfully.

§

LinkedEventFailed = 1

A linked event in the batch failed, so this event was not applied.

§

LinkedEventChainOpen = 2

A linked event chain was not closed properly.

§

TimestampMustBeZero = 3

The timestamp field must be zero (server assigns timestamps).

§

ReservedFlag = 4

A reserved flag was set.

§

IdMustNotBeZero = 5

Transfer ID must not be zero.

§

IdMustNotBeIntMax = 6

Transfer ID must not be u128::MAX.

§

FlagsAreMutuallyExclusive = 7

Mutually exclusive flags were set together.

§

DebitAccountIdMustNotBeZero = 8

Debit account ID must not be zero.

§

DebitAccountIdMustNotBeIntMax = 9

Debit account ID must not be u128::MAX.

§

CreditAccountIdMustNotBeZero = 10

Credit account ID must not be zero.

§

CreditAccountIdMustNotBeIntMax = 11

Credit account ID must not be u128::MAX.

§

AccountsMustBeDifferent = 12

Debit and credit accounts must be different.

§

PendingIdMustBeZero = 13

pending_id must be zero for non-posting/voiding transfers.

§

PendingIdMustNotBeZero = 14

pending_id must not be zero for posting/voiding transfers.

§

PendingIdMustNotBeIntMax = 15

pending_id must not be u128::MAX.

§

PendingIdMustBeDifferent = 16

pending_id must be different from the transfer ID.

§

TimeoutReservedForPendingTransfer = 17

Timeout is only valid for pending transfers.

§

LedgerMustNotBeZero = 19

Ledger must not be zero.

§

CodeMustNotBeZero = 20

Code must not be zero.

§

DebitAccountNotFound = 21

Debit account not found.

§

CreditAccountNotFound = 22

Credit account not found.

§

AccountsMustHaveTheSameLedger = 23

Debit and credit accounts must have the same ledger.

§

TransferMustHaveTheSameLedgerAsAccounts = 24

Transfer ledger must match the accounts’ ledger.

§

PendingTransferNotFound = 25

Referenced pending transfer not found.

§

PendingTransferNotPending = 26

Referenced transfer is not pending.

§

PendingTransferHasDifferentDebitAccountId = 27

Pending transfer has different debit account.

§

PendingTransferHasDifferentCreditAccountId = 28

Pending transfer has different credit account.

§

PendingTransferHasDifferentLedger = 29

Pending transfer has different ledger.

§

PendingTransferHasDifferentCode = 30

Pending transfer has different code.

§

ExceedsPendingTransferAmount = 31

Post amount exceeds pending transfer amount.

§

PendingTransferHasDifferentAmount = 32

Pending transfer has different amount (for void).

§

PendingTransferAlreadyPosted = 33

Pending transfer was already posted.

§

PendingTransferAlreadyVoided = 34

Pending transfer was already voided.

§

PendingTransferExpired = 35

Pending transfer has expired.

§

ExistsWithDifferentFlags = 36

Transfer exists with different flags.

§

ExistsWithDifferentDebitAccountId = 37

Transfer exists with different debit account.

§

ExistsWithDifferentCreditAccountId = 38

Transfer exists with different credit account.

§

ExistsWithDifferentAmount = 39

Transfer exists with different amount.

§

ExistsWithDifferentPendingId = 40

Transfer exists with different pending_id.

§

ExistsWithDifferentUserData128 = 41

Transfer exists with different user_data_128.

§

ExistsWithDifferentUserData64 = 42

Transfer exists with different user_data_64.

§

ExistsWithDifferentUserData32 = 43

Transfer exists with different user_data_32.

§

ExistsWithDifferentTimeout = 44

Transfer exists with different timeout.

§

ExistsWithDifferentCode = 45

Transfer exists with different code.

§

Exists = 46

Transfer already exists (idempotent success).

§

OverflowsDebitsPending = 47

Transfer would overflow debit account’s debits_pending.

§

OverflowsCreditsPending = 48

Transfer would overflow credit account’s credits_pending.

§

OverflowsDebitsPosted = 49

Transfer would overflow debit account’s debits_posted.

§

OverflowsCreditsPosted = 50

Transfer would overflow credit account’s credits_posted.

§

OverflowsDebits = 51

Transfer would overflow debit account’s total debits.

§

OverflowsCredits = 52

Transfer would overflow credit account’s total credits.

§

OverflowsTimeout = 53

Transfer timeout would overflow.

§

ExceedsCredits = 54

Transfer exceeds credit account’s available credits.

§

ExceedsDebits = 55

Transfer exceeds debit account’s available debits.

§

ImportedEventExpected = 56

Expected an imported event but IMPORTED flag not set.

§

ImportedEventNotExpected = 57

IMPORTED flag set but not in import mode.

§

ImportedEventTimestampOutOfRange = 58

Imported event timestamp is out of valid range.

§

ImportedEventTimestampMustNotAdvance = 59

Imported event timestamp must not advance beyond current.

§

ImportedEventTimestampMustNotRegress = 60

Imported event timestamp must not regress.

§

ImportedEventTimestampMustPostdateDebitAccount = 61

Imported event timestamp must postdate the debit account.

§

ImportedEventTimestampMustPostdateCreditAccount = 62

Imported event timestamp must postdate the credit account.

§

ImportedEventTimeoutMustBeZero = 63

Imported event timeout must be zero.

§

ClosingTransferMustBePending = 64

Closing transfer must reference a pending transfer.

§

DebitAccountAlreadyClosed = 65

Debit account is already closed.

§

CreditAccountAlreadyClosed = 66

Credit account is already closed.

§

ExistsWithDifferentLedger = 67

Transfer exists with different ledger.

§

IdAlreadyFailed = 68

This ID was previously used in a failed transfer.

Trait Implementations§

Source§

impl Clone for CreateTransferResult

Source§

fn clone(&self) -> CreateTransferResult

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CreateTransferResult

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for CreateTransferResult

Source§

fn eq(&self, other: &CreateTransferResult) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for CreateTransferResult

Source§

impl Eq for CreateTransferResult

Source§

impl StructuralPartialEq for CreateTransferResult

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V