Skip to main content

TransactionType

Enum TransactionType 

Source
#[repr(i16)]
pub enum TransactionType {
Show 51 variants Invalid = -1, Payment = 0, EscrowCreate = 1, EscrowFinish = 2, AccountSet = 3, EscrowCancel = 4, SetRegularKey = 5, NickNameSet = 6, OfferCreate = 7, OfferCancel = 8, Contract = 9, TicketCreate = 10, TicketCancel = 11, SignerListSet = 12, PaymentChannelCreate = 13, PaymentChannelFund = 14, PaymentChannelClaim = 15, CheckCreate = 16, CheckCash = 17, CheckCancel = 18, DepositPreauth = 19, TrustSet = 20, AccountDelete = 21, SetHook = 22, NFTokenMint = 25, NFTokenBurn = 26, NFTokenCreateOffer = 27, NFTokenCancelOffer = 28, NFTokenAcceptOffer = 29, Clawback = 30, AMMCreate = 35, AMMDeposit = 36, AMMWithdraw = 37, AMMVote = 38, AMMBid = 39, AMMDelete = 40, XChainCreateClaimID = 41, XChainCommit = 42, XChainClaim = 43, XChainAccountCreateCommit = 44, XChainAddClaimAttestation = 45, XChainAddAccountCreateAttestation = 46, XChainModifyBridge = 47, XChainCreateBridge = 48, DIDSet = 49, DIDDelete = 50, OracleSet = 51, OracleDelete = 52, EnableAmendment = 100, SetFee = 101, UNLModify = 102,
}
Expand description

The type of any given XRPL transaction.

This enum maps to the transaction type codes used in the XRPL protocol. Each variant corresponds to a specific transaction type with its associated numeric code.

§Derived Traits

  • Debug: Useful for development and debugging
  • Clone: Automatically derived with Copy for consistency
  • Copy: Efficient for this enum (2 bytes due to #[repr(i16)])
  • PartialEq, Eq: Enable transaction type comparisons

The Copy trait is appropriate here because:

  • The enum is only 2 bytes, making copies extremely cheap
  • Transaction types are frequently checked and compared
  • Implicit copying improves ergonomics

Variants§

§

Invalid = -1

§

Payment = 0

§

EscrowCreate = 1

§

EscrowFinish = 2

§

AccountSet = 3

§

EscrowCancel = 4

§

SetRegularKey = 5

§

NickNameSet = 6

§

OfferCreate = 7

§

OfferCancel = 8

§

Contract = 9

§

TicketCreate = 10

§

TicketCancel = 11

§

SignerListSet = 12

§

PaymentChannelCreate = 13

§

PaymentChannelFund = 14

§

PaymentChannelClaim = 15

§

CheckCreate = 16

§

CheckCash = 17

§

CheckCancel = 18

§

DepositPreauth = 19

§

TrustSet = 20

§

AccountDelete = 21

§

SetHook = 22

§

NFTokenMint = 25

§

NFTokenBurn = 26

§

NFTokenCreateOffer = 27

§

NFTokenCancelOffer = 28

§

NFTokenAcceptOffer = 29

§

Clawback = 30

§

AMMCreate = 35

§

AMMDeposit = 36

§

AMMWithdraw = 37

§

AMMVote = 38

§

AMMBid = 39

§

AMMDelete = 40

§

XChainCreateClaimID = 41

§

XChainCommit = 42

§

XChainClaim = 43

§

XChainAccountCreateCommit = 44

§

XChainAddClaimAttestation = 45

§

XChainAddAccountCreateAttestation = 46

§

XChainModifyBridge = 47

§

XChainCreateBridge = 48

§

DIDSet = 49

§

DIDDelete = 50

§

OracleSet = 51

§

OracleDelete = 52

§

EnableAmendment = 100

§

SetFee = 101

§

UNLModify = 102

Trait Implementations§

Source§

impl Clone for TransactionType

Source§

fn clone(&self) -> TransactionType

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for TransactionType

Source§

impl Debug for TransactionType

Source§

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

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

impl Eq for TransactionType

Source§

impl FieldDecoder for TransactionType

FieldDecoder for XRPL transaction types: decodes a 2-byte buffer via the existing (infallible) i16 mapping, failing only if the host wrote a different number of bytes.

Source§

type Buffer = [u8; 2]

The buffer a get_field caller allocates before invoking the host function. Each type picks its own size (an associated type, not a const, so this stays on stable Rust).
Source§

fn empty_buffer() -> Self::Buffer

Returns a zero-initialized buffer of this type’s Buffer size.
Source§

fn decode(buf: Self::Buffer, bytes_written: usize) -> Result<Self, DecodeError>

Decodes Self from the full Buffer (as written by the host, then zero-padded to the buffer’s size), given bytes_written — the number of bytes the host actually wrote. Read more
Source§

impl From<TransactionType> for [u8; 2]

Source§

fn from(value: TransactionType) -> Self

Converts to this type from the input type.
Source§

impl From<[u8; 2]> for TransactionType

Source§

fn from(value: [u8; 2]) -> Self

Converts to this type from the input type.
Source§

impl From<i16> for TransactionType

Source§

fn from(value: i16) -> Self

Converts to this type from the input type.
Source§

impl FromCurrentTx for TransactionType

Source§

impl PartialEq for TransactionType

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TransactionType

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
§

impl<T> Any for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

§

fn type_name(&self) -> &'static str

§

impl<T> AnySync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.