pub struct AccountBuilder(/* private fields */);Expand description
Builder for an owned account representation.
Use this when the account does not start from a borrowed external buffer.
Implementations§
Source§impl AccountBuilder
impl AccountBuilder
Sourcepub fn mode(self, mode: AccountMode) -> Self
pub fn mode(self, mode: AccountMode) -> Self
Sets the account persistence mode of the account
Sourcepub fn executable(self, executable: bool) -> Self
pub fn executable(self, executable: bool) -> Self
Sets the executable flag.
Sourcepub fn read(&self) -> &OwnedAccount
pub fn read(&self) -> &OwnedAccount
Borrows the account under construction.
Sourcepub fn build<A: From<OwnedAccount>>(self) -> A
pub fn build<A: From<OwnedAccount>>(self) -> A
Finishes building the owned account.
Trait Implementations§
Source§impl Clone for AccountBuilder
impl Clone for AccountBuilder
Source§fn clone(&self) -> AccountBuilder
fn clone(&self) -> AccountBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for AccountBuilder
impl Default for AccountBuilder
Source§fn default() -> AccountBuilder
fn default() -> AccountBuilder
Returns the “default value” for a type. Read more
Source§impl From<Account> for AccountBuilder
impl From<Account> for AccountBuilder
Source§impl From<AccountBuilder> for OwnedAccount
impl From<AccountBuilder> for OwnedAccount
Source§fn from(value: AccountBuilder) -> Self
fn from(value: AccountBuilder) -> Self
Converts to this type from the input type.
Source§fn from(value: AccountSharedData) -> Self
fn from(value: AccountSharedData) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AccountBuilder
impl RefUnwindSafe for AccountBuilder
impl Send for AccountBuilder
impl Sync for AccountBuilder
impl Unpin for AccountBuilder
impl UnsafeUnpin for AccountBuilder
impl UnwindSafe for AccountBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more