CreateAccountResult

Enum CreateAccountResult 

Source
#[repr(u32)]
pub enum CreateAccountResult {
Show 27 variants Ok = 0, LinkedEventFailed = 1, LinkedEventChainOpen = 2, TimestampMustBeZero = 3, ReservedField = 4, ReservedFlag = 5, IdMustNotBeZero = 6, IdMustNotBeIntMax = 7, FlagsAreMutuallyExclusive = 8, DebitsPendingMustBeZero = 9, DebitsPostedMustBeZero = 10, CreditsPendingMustBeZero = 11, CreditsPostedMustBeZero = 12, LedgerMustNotBeZero = 13, CodeMustNotBeZero = 14, ExistsWithDifferentFlags = 15, ExistsWithDifferentUserData128 = 16, ExistsWithDifferentUserData64 = 17, ExistsWithDifferentUserData32 = 18, ExistsWithDifferentLedger = 19, ExistsWithDifferentCode = 20, Exists = 21, ImportedEventExpected = 22, ImportedEventNotExpected = 23, ImportedEventTimestampOutOfRange = 24, ImportedEventTimestampMustNotAdvance = 25, ImportedEventTimestampMustNotRegress = 26,
}
Expand description

Create account result codes.

These match the exact values from the TigerBeetle protocol.

Variants§

§

Ok = 0

Account 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).

§

ReservedField = 4

A reserved field was set to a non-zero value.

§

ReservedFlag = 5

A reserved flag was set.

§

IdMustNotBeZero = 6

Account ID must not be zero.

§

IdMustNotBeIntMax = 7

Account ID must not be u128::MAX.

§

FlagsAreMutuallyExclusive = 8

Mutually exclusive flags were set together.

§

DebitsPendingMustBeZero = 9

debits_pending must be zero on creation.

§

DebitsPostedMustBeZero = 10

debits_posted must be zero on creation.

§

CreditsPendingMustBeZero = 11

credits_pending must be zero on creation.

§

CreditsPostedMustBeZero = 12

credits_posted must be zero on creation.

§

LedgerMustNotBeZero = 13

Ledger must not be zero.

§

CodeMustNotBeZero = 14

Code must not be zero.

§

ExistsWithDifferentFlags = 15

Account exists with different flags.

§

ExistsWithDifferentUserData128 = 16

Account exists with different user_data_128.

§

ExistsWithDifferentUserData64 = 17

Account exists with different user_data_64.

§

ExistsWithDifferentUserData32 = 18

Account exists with different user_data_32.

§

ExistsWithDifferentLedger = 19

Account exists with different ledger.

§

ExistsWithDifferentCode = 20

Account exists with different code.

§

Exists = 21

Account already exists (idempotent success).

§

ImportedEventExpected = 22

Expected an imported event but IMPORTED flag not set.

§

ImportedEventNotExpected = 23

IMPORTED flag set but not in import mode.

§

ImportedEventTimestampOutOfRange = 24

Imported event timestamp is out of valid range.

§

ImportedEventTimestampMustNotAdvance = 25

Imported event timestamp must not advance beyond current.

§

ImportedEventTimestampMustNotRegress = 26

Imported event timestamp must not regress.

Trait Implementations§

Source§

impl Clone for CreateAccountResult

Source§

fn clone(&self) -> CreateAccountResult

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 CreateAccountResult

Source§

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

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

impl PartialEq for CreateAccountResult

Source§

fn eq(&self, other: &CreateAccountResult) -> 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 CreateAccountResult

Source§

impl Eq for CreateAccountResult

Source§

impl StructuralPartialEq for CreateAccountResult

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