pub struct BorrowedAccount<'a> { /* private fields */ }
Expand description

Shared account borrowed from the TransactionContext and an InstructionContext.

Implementations

Returns the index of this account (transaction wide)

Returns the public key of this account (transaction wide)

Returns the owner of this account (transaction wide)

Assignes the owner of this account (transaction wide)

Returns the number of lamports of this account (transaction wide)

Overwrites the number of lamports of this account (transaction wide)

Adds lamports to this account (transaction wide)

Subtracts lamports from this account (transaction wide)

Returns a read-only slice of the account data (transaction wide)

Returns a writable slice of the account data (transaction wide)

Overwrites the account data and size (transaction wide)

Resizes the account data (transaction wide)

Fills it with zeros at the end if is extended or truncates at the end otherwise.

Deserializes the account data into a state

Serializes a state into the account data

Returns whether this account is executable (transaction wide)

Configures whether this account is executable (transaction wide)

Returns the rent epoch of this account (transaction wide)

Returns whether this account is a signer (instruction wide)

Returns whether this account is writable (instruction wide)

Returns true if the owner of this account is the current InstructionContexts last program (instruction wide)

Returns an error if the account data can not be mutated by the current program

Returns an error if the account data can not be resized to the given length

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.