Operation

Enum Operation 

Source
pub enum Operation {
Show 27 variants CreateAccount(CreateAccountOperation), Payment(PaymentOperation), PathPaymentStrictReceive(PathPaymentStrictReceiveOperation), ManageSellOffer(ManageSellOfferOperation), CreatePassiveSellOffer(CreatePassiveSellOfferOperation), SetOptions(SetOptionsOperation), ChangeTrust(ChangeTrustOperation), AllowTrust(AllowTrustOperation), AccountMerge(AccountMergeOperation), Inflation(InflationOperation), ManageData(ManageDataOperation), BumpSequence(BumpSequenceOperation), ManageBuyOffer(ManageBuyOfferOperation), PathPaymentStrictSend(PathPaymentStrictSendOperation), CreateClaimableBalance(CreateClaimableBalanceOperation), ClaimClaimableBalance(ClaimClaimableBalanceOperation), BeginSponsoringFutureReserves(BeginSponsoringFutureReservesOperation), EndSponsoringFutureReserves(EndSponsoringFutureReservesOperation), RevokeSponsorship(RevokeSponsorshipOperation), Clawback(ClawbackOperation), ClawbackClaimableBalance(ClawbackClaimableBalanceOperation), SetTrustLineFlags(SetTrustLineFlagsOperation), LiquidityPoolDeposit(LiquidityPoolDepositOperation), LiquidityPoolWithdraw(LiquidityPoolWithdrawOperation), InvokeHostFunction(InvokeHostFunctionOperation), ExtendFootprintTtl(ExtendFootprintTtlOperation), RestoreFootprint(RestoreFootprintOperation),
}
Expand description

Operations on a Stellar network.

Variants§

§

CreateAccount(CreateAccountOperation)

Create and fund a non existing account.

§

Payment(PaymentOperation)

Create a payment.

§

PathPaymentStrictReceive(PathPaymentStrictReceiveOperation)

Send the specified amount of asset, optionally through a path.

§

ManageSellOffer(ManageSellOfferOperation)

Create, update, or delete a sell offer.

§

CreatePassiveSellOffer(CreatePassiveSellOfferOperation)

Create a passive sell offer. This offer won’t consume a counter offer that exactly matches this offer.

§

SetOptions(SetOptionsOperation)

Change the account options.

§

ChangeTrust(ChangeTrustOperation)

Add, remove, or update a trust line for the given asset.

§

AllowTrust(AllowTrustOperation)

Authorize another account to hold your account’s credit aset.

§

AccountMerge(AccountMergeOperation)

Transfer all of account balance into destination account.

§

Inflation(InflationOperation)

Generate the inflation.

§

ManageData(ManageDataOperation)

Add o remove data entry.

§

BumpSequence(BumpSequenceOperation)

Bumps the account sequence number.

§

ManageBuyOffer(ManageBuyOfferOperation)

Create, update, or delete a buy offer.

§

PathPaymentStrictSend(PathPaymentStrictSendOperation)

Send the specified amount of asset, optionally through a path.

§

CreateClaimableBalance(CreateClaimableBalanceOperation)

Create a new claimable balance.

§

ClaimClaimableBalance(ClaimClaimableBalanceOperation)

Claim a claimable balance.

§

BeginSponsoringFutureReserves(BeginSponsoringFutureReservesOperation)

Begin sponsoring future reserves for an account. Needs a matching EndSponsoringFutureReserves in the same transaction.

§

EndSponsoringFutureReserves(EndSponsoringFutureReservesOperation)

Ends a BeginSponsoringFutureReserves operation in the transaction.

§

RevokeSponsorship(RevokeSponsorshipOperation)

Revoke a reserve sponsorship.

§

Clawback(ClawbackOperation)

§

ClawbackClaimableBalance(ClawbackClaimableBalanceOperation)

§

SetTrustLineFlags(SetTrustLineFlagsOperation)

§

LiquidityPoolDeposit(LiquidityPoolDepositOperation)

§

LiquidityPoolWithdraw(LiquidityPoolWithdrawOperation)

§

InvokeHostFunction(InvokeHostFunctionOperation)

§

ExtendFootprintTtl(ExtendFootprintTtlOperation)

§

RestoreFootprint(RestoreFootprintOperation)

Implementations§

Source§

impl Operation

Source

pub fn new_create_account() -> CreateAccountOperationBuilder

Creates a new create account operation builder.

Source

pub fn new_payment() -> PaymentOperationBuilder

Creates a new payment operation builder.

Source

pub fn new_path_payment_strict_receive() -> PathPaymentStrictReceiveOperationBuilder

Creates a new path payment strict receive operation builder.

Source

pub fn new_manage_sell_offer() -> ManageSellOfferOperationBuilder

Creates a new manage sell offer operation builder.

Source

pub fn new_create_passive_sell_offer() -> CreatePassiveSellOfferOperationBuilder

Creates a new create passive sell offer operation builder.

Source

pub fn new_set_options() -> SetOptionsOperationBuilder

Creates a new set options operation builder.

Source

pub fn new_change_trust() -> ChangeTrustOperationBuilder

Creates a new change trust operation builder.

Source

pub fn new_allow_trust() -> AllowTrustOperationBuilder

Creates a new allow trust operation builder.

Source

pub fn new_account_merge() -> AccountMergeOperationBuilder

Creates a new account merge operation builder.

Source

pub fn new_inflation() -> InflationOperationBuilder

Creates a new inflation operation builder.

Source

pub fn new_manage_data() -> ManageDataOperationBuilder

Creates a new manage data operation builder.

Source

pub fn new_bump_sequence() -> BumpSequenceOperationBuilder

Creates a new bump sequence operation builder.

Source

pub fn new_manage_buy_offer() -> ManageBuyOfferOperationBuilder

Creates a new manage buy offer operation builder.

Source

pub fn new_path_payment_strict_send() -> PathPaymentStrictSendOperationBuilder

Creates a new path payment strict send operation builder.

Source

pub fn new_create_claimable_balance() -> CreateClaimableBalanceOperationBuilder

Creates a new create claimable balance operation builder.

Source

pub fn new_claim_claimable_balance() -> ClaimClaimableBalanceOperationBuilder

Creates a new claim claimable balance operation builder.

Source

pub fn new_begin_sponsoring_future_reserves() -> BeginSponsoringFutureReservesOperationBuilder

Creates a new begin sponsoring future reserves operation builder.

Source

pub fn new_end_sponsoring_future_reserves() -> EndSponsoringFutureReservesOperationBuilder

Creates a new end sponsoring future reserves operation builder.

Source

pub fn new_revoke_sponsorship() -> RevokeSponsorshipOperationBuilder

Creates a new revoke sponsorship operation builder.

Source

pub fn new_clawback() -> ClawbackOperationBuilder

Source

pub fn new_clawback_claimable_balance() -> ClawbackClaimableBalanceOperationBuilder

Source

pub fn new_set_trustline_flags() -> SetTrustLineFlagsOperationBuilder

Source

pub fn new_liquidity_pool_deposit() -> LiquidityPoolDepositOperationBuilder

Source

pub fn new_liquidity_pool_withdraw() -> LiquidityPoolWithdrawOperationBuilder

Source

pub fn new_invoke_host_function() -> InvokeHostFunctionOperationBuilder

Source

pub fn new_extend_footprint_ttl() -> ExtendFootprintTtlOperationBuilder

Creates a new extend footprint ttl operation builder.

Source

pub fn new_restore_footprint() -> RestoreFootprintOperationBuilder

Source

pub fn as_create_account(&self) -> Option<&CreateAccountOperation>

If the operation is a CreateAccount, returns its value. Returns None otherwise.

Source

pub fn as_create_account_mut(&mut self) -> Option<&mut CreateAccountOperation>

If the operation is a CreateAccount, returns its mutable value. Returns None otherwise.

Source

pub fn is_create_account(&self) -> bool

Returns true if the operation is a CreateAccount.

Source

pub fn as_payment(&self) -> Option<&PaymentOperation>

If the operation is a Payment, returns its value. Returns None otherwise.

Source

pub fn as_payment_mut(&mut self) -> Option<&mut PaymentOperation>

If the operation is a Payment, returns its value. Returns None otherwise.

Source

pub fn is_payment(&self) -> bool

Returns true if the operation is a Payment.

Source

pub fn as_path_payment_strict_receive( &self, ) -> Option<&PathPaymentStrictReceiveOperation>

If the operation is a PathPaymentStrictReceive, returns its value. Returns None otherwise.

Source

pub fn as_path_payment_strict_receive_mut( &mut self, ) -> Option<&mut PathPaymentStrictReceiveOperation>

If the operation is a PathPaymentStrictReceive, returns its mutable value. Returns None otherwise.

Source

pub fn is_path_payment_strict_receive(&self) -> bool

Returns true if the operation is a PathPaymentStrictReceive.

Source

pub fn as_manage_sell_offer(&self) -> Option<&ManageSellOfferOperation>

If the operation is a ManageSellOffer, returns its value. Returns None otherwise.

Source

pub fn as_manage_sell_offer_mut( &mut self, ) -> Option<&mut ManageSellOfferOperation>

If the operation is a ManageSellOffer, returns its mutable value. Returns None otherwise.

Source

pub fn is_manage_sell_offer(&self) -> bool

Returns true if the operation is a ManageSellOffer.

Source

pub fn as_create_passive_sell_offer( &self, ) -> Option<&CreatePassiveSellOfferOperation>

If the operation is a CreatePassiveSellOffer, returns its value. Returns None otherwise.

Source

pub fn as_create_passive_sell_offer_mut( &mut self, ) -> Option<&mut CreatePassiveSellOfferOperation>

If the operation is a CreatePassiveSellOffer, returns its mutable value. Returns None otherwise.

Source

pub fn is_create_passive_sell_offer(&self) -> bool

Returns true if the operation is a CreatePassiveSellOffer.

Source

pub fn as_set_options(&self) -> Option<&SetOptionsOperation>

If the operation is a SetOptions, returns its value. Returns None otherwise.

Source

pub fn as_set_options_mut(&mut self) -> Option<&mut SetOptionsOperation>

If the operation is a SetOptions, returns its mutable value. Returns None otherwise.

Source

pub fn is_set_options(&self) -> bool

Returns true if the operation is a SetOptions.

Source

pub fn as_change_trust(&self) -> Option<&ChangeTrustOperation>

If the operation is a ChangeTrust, returns its value. Returns None otherwise.

Source

pub fn as_change_trust_mut(&mut self) -> Option<&ChangeTrustOperation>

If the operation is a ChangeTrust, returns its mutable value. Returns None otherwise.

Source

pub fn is_change_trust(&self) -> bool

Returns true if the operation is a ChangeTrust.

Source

pub fn as_allow_trust(&self) -> Option<&AllowTrustOperation>

If the operation is a AllowTrust, returns its value. Returns None otherwise.

Source

pub fn as_allow_trust_mut(&mut self) -> Option<&mut AllowTrustOperation>

If the operation is a AllowTrust, returns its mutable value. Returns None otherwise.

Source

pub fn is_allow_trust(&self) -> bool

Returns true if the operation is a AllowTrust.

Source

pub fn as_account_merge(&self) -> Option<&AccountMergeOperation>

If the operation is a AccountMerge, returns its value. Returns None otherwise.

Source

pub fn as_account_merge_mut(&mut self) -> Option<&mut AccountMergeOperation>

If the operation is a AccountMerge, returns its mutable value. Returns None otherwise.

Source

pub fn is_account_merge(&self) -> bool

Returns true if the operation is a AccountMerge.

Source

pub fn as_inflation(&self) -> Option<&InflationOperation>

If the operation is a Inflation, returns its value. Returns None otherwise.

Source

pub fn as_inflation_mut(&mut self) -> Option<&mut InflationOperation>

If the operation is a Inflation, returns its mutable value. Returns None otherwise.

Source

pub fn is_inflation(&self) -> bool

Returns true if the operation is a Inflation.

Source

pub fn as_manage_data(&self) -> Option<&ManageDataOperation>

If the operation is a ManageData, returns its value. Returns None otherwise.

Source

pub fn as_manage_data_mut(&mut self) -> Option<&mut ManageDataOperation>

If the operation is a ManageData, returns its mutable value. Returns None otherwise.

Source

pub fn is_manage_data(&self) -> bool

Returns true if the operation is a ManageData.

Source

pub fn as_bump_sequence(&self) -> Option<&BumpSequenceOperation>

If the operation is a BumpSequence, returns its value. Returns None otherwise.

Source

pub fn as_bump_sequence_mut(&mut self) -> Option<&mut BumpSequenceOperation>

If the operation is a BumpSequence, returns its mutable value. Returns None otherwise.

Source

pub fn is_bump_sequence(&self) -> bool

Returns true if the operation is a BumpSequence.

Source

pub fn as_manage_buy_offer(&self) -> Option<&ManageBuyOfferOperation>

If the operation is a ManageBuyOffer, returns its value. Returns None otherwise.

Source

pub fn as_manage_buy_offer_mut( &mut self, ) -> Option<&mut ManageBuyOfferOperation>

If the operation is a ManageBuyOffer, returns its mutable value. Returns None otherwise.

Source

pub fn is_manage_buy_offer(&self) -> bool

Returns true if the operation is a ManageBuyOffer.

Source

pub fn as_path_payment_strict_send( &self, ) -> Option<&PathPaymentStrictSendOperation>

If the operation is a PathPaymentStrictSend, returns its value. Returns None otherwise.

Source

pub fn as_path_payment_strict_send_mut( &mut self, ) -> Option<&mut PathPaymentStrictSendOperation>

If the operation is a PathPaymentStrictSend, returns its mutable value. Returns None otherwise.

Source

pub fn is_path_payment_strict_send(&self) -> bool

Returns true if the operation is a PathPaymentStrictSend.

Source

pub fn as_create_claimable_balance( &self, ) -> Option<&CreateClaimableBalanceOperation>

If the operation is a CreateClaimableBalance, returns its value. Returns None otherwise.

Source

pub fn as_create_claimable_balance_mut( &mut self, ) -> Option<&mut CreateClaimableBalanceOperation>

If the operation is a CreateClaimableBalance, returns its mutable value. Returns None otherwise.

Source

pub fn is_create_claimable_balance(&self) -> bool

Returns true if the operation is a CreateClaimableBalance.

Source

pub fn as_claim_claimable_balance( &self, ) -> Option<&ClaimClaimableBalanceOperation>

If the operation is a ClaimClaimableBalance, returns its value. Returns None otherwise.

Source

pub fn as_claim_claimable_balance_mut( &mut self, ) -> Option<&mut ClaimClaimableBalanceOperation>

If the operation is a ClaimClaimableBalance, returns its mutable value. Returns None otherwise.

Source

pub fn is_claim_claimable_balance(&self) -> bool

Returns true if the operation is a ClaimClaimableBalance.

Source

pub fn as_begin_sponsoring_future_reserves( &self, ) -> Option<&BeginSponsoringFutureReservesOperation>

If the operation is a BeginSponsoringFutureReserves, returns its value. Returns None otherwise.

Source

pub fn as_begin_sponsoring_future_reserves_mut( &mut self, ) -> Option<&mut BeginSponsoringFutureReservesOperation>

If the operation is a BeginSponsoringFutureReserves, returns its mutable value. Returns None otherwise.

Source

pub fn is_begin_sponsoring_future_reserves(&self) -> bool

Returns true if the operation is a BeginSponsoringFutureReserves.

Source

pub fn as_end_sponsoring_future_reserves( &self, ) -> Option<&EndSponsoringFutureReservesOperation>

If the operation is a EndSponsoringFutureReserves, returns its value. Returns None otherwise.

Source

pub fn as_end_sponsoring_future_reserves_mut( &mut self, ) -> Option<&mut EndSponsoringFutureReservesOperation>

If the operation is a EndSponsoringFutureReserves, returns its mutable value. Returns None otherwise.

Source

pub fn is_end_sponsoring_future_reserves(&self) -> bool

Returns true if the operation is a EndSponsoringFutureReserves.

Source

pub fn as_revoke_sponsorship(&self) -> Option<&RevokeSponsorshipOperation>

If the operation is a RevokeSponsorship, returns its value. Returns None otherwise.

Source

pub fn as_revoke_sponsorship_mut( &mut self, ) -> Option<&mut RevokeSponsorshipOperation>

If the operation is a RevokeSponsorship, returns its mutable value. Returns None otherwise.

Source

pub fn is_revoke_sponsorship(&self) -> bool

Returns true if the operation is a RevokeSponsorship.

Source

pub fn as_clawback(&self) -> Option<&ClawbackOperation>

Source

pub fn as_clawback_mut(&mut self) -> Option<&mut ClawbackOperation>

Source

pub fn is_clawback(&self) -> bool

Source

pub fn as_clawback_claimable_balance( &self, ) -> Option<&ClawbackClaimableBalanceOperation>

Source

pub fn as_clawback_claimable_balance_mut( &mut self, ) -> Option<&mut ClawbackClaimableBalanceOperation>

Source

pub fn is_clawback_claimable_balance(&self) -> bool

Source

pub fn as_set_trustline_flags(&self) -> Option<&SetTrustLineFlagsOperation>

Source

pub fn as_set_trustline_flags_mut( &mut self, ) -> Option<&mut SetTrustLineFlagsOperation>

Source

pub fn is_set_trustline_flags(&self) -> bool

Source

pub fn as_liquidity_pool_deposit( &self, ) -> Option<&LiquidityPoolDepositOperation>

Source

pub fn as_liquidity_pool_deposit_mut( &mut self, ) -> Option<&mut LiquidityPoolDepositOperation>

Source

pub fn is_liquidity_pool_deposit(&self) -> bool

Source

pub fn as_liquidity_pool_withdraw( &self, ) -> Option<&LiquidityPoolWithdrawOperation>

Source

pub fn as_liquidity_pool_withdraw_mut( &mut self, ) -> Option<&mut LiquidityPoolWithdrawOperation>

Source

pub fn is_liquidity_pool_withdraw(&self) -> bool

Source

pub fn source_account(&self) -> &Option<MuxedAccount>

Retrieves the operation source account.

Source

pub fn source_account_mut(&mut self) -> &mut Option<MuxedAccount>

Retrieves a mutable reference to the operation source account.

Source

pub fn to_xdr(&self) -> Result<Operation>

Returns the xdr object.

Source

pub fn from_xdr(x: &Operation) -> Result<Operation>

Creates from the xdr object.

Trait Implementations§

Source§

impl Clone for Operation

Source§

fn clone(&self) -> Operation

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 Operation

Source§

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

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

impl PartialEq for Operation

Source§

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

Source§

fn read_xdr<R: Read>(r: &mut Limited<R>) -> Result<Self>

Read the XDR and construct the type. Read more
Source§

fn read_xdr_to_end<R>(r: &mut Limited<R>) -> Result<Self, Error>
where R: Read,

Read the XDR and construct the type, and consider it an error if the read does not completely consume the read implementation. Read more
Source§

fn read_xdr_into<R>(&mut self, r: &mut Limited<R>) -> Result<(), Error>
where R: Read,

Read the XDR and construct the type. Read more
Source§

fn read_xdr_into_to_end<R>(&mut self, r: &mut Limited<R>) -> Result<(), Error>
where R: Read,

Read the XDR into the existing value, and consider it an error if the read does not completely consume the read implementation. Read more
Source§

fn read_xdr_iter<R>(r: &mut Limited<R>) -> ReadXdrIter<&mut R, Self>
where R: Read,

Create an iterator that reads the read implementation as a stream of values that are read into the implementing type. Read more
Source§

fn from_xdr(bytes: impl AsRef<[u8]>, limits: Limits) -> Result<Self, Error>

Construct the type from the XDR bytes. Read more
Source§

impl WriteXdr for Operation

Source§

fn write_xdr<W: Write>(&self, w: &mut Limited<W>) -> Result<()>

Source§

fn to_xdr(&self, limits: Limits) -> Result<Vec<u8>, Error>

Source§

impl Eq for Operation

Source§

impl StructuralPartialEq for Operation

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> Same for T

Source§

type Output = T

Should always be Self
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

Source§

impl<T> XDRDeserialize for T
where T: ReadXdr,

Source§

fn from_xdr_bytes(buffer: &[u8]) -> Result<(T, u64), Error>

Source§

fn from_xdr_base64(encoded: &str) -> Result<Self>

Source§

impl<T> XDRSerialize for T
where T: WriteXdr + ?Sized,

Source§

fn write_xdr(&self, out: &mut Vec<u8>) -> Result<u64, Error>

Source§

fn xdr_bytes(&self) -> Result<Vec<u8>>

Source§

fn xdr_base64(&self) -> Result<String>