#[repr(C)]pub struct AccountMetaFlags { /* private fields */ }
Expand description
The struct that handles the account meta flags.
Implementations§
Source§impl AccountMetaFlags
impl AccountMetaFlags
Sourcepub const fn into_bytes(self) -> [u8; 4]
pub const fn into_bytes(self) -> [u8; 4]
Sourcepub const fn from_bytes(bytes: [u8; 4]) -> Self
pub const fn from_bytes(bytes: [u8; 4]) -> Self
Converts the given bytes directly into the bitfield struct.
Source§impl AccountMetaFlags
impl AccountMetaFlags
Sourcepub fn has_rent_epoch(&self) -> <bool as Specifier>::InOut
pub fn has_rent_epoch(&self) -> <bool as Specifier>::InOut
Returns the value of has_rent_epoch. whether the account meta has rent epoch
Sourcepub fn has_rent_epoch_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn has_rent_epoch_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of has_rent_epoch.
#Errors
If the returned value contains an invalid bit pattern for has_rent_epoch. whether the account meta has rent epoch
Sourcepub fn with_has_rent_epoch(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_has_rent_epoch(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of has_rent_epoch set to the given value.
#Panics
If the given value is out of bounds for has_rent_epoch. whether the account meta has rent epoch
Sourcepub fn with_has_rent_epoch_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_has_rent_epoch_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of has_rent_epoch set to the given value.
#Errors
If the given value is out of bounds for has_rent_epoch. whether the account meta has rent epoch
Sourcepub fn set_has_rent_epoch(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_has_rent_epoch(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of has_rent_epoch to the given value.
#Panics
If the given value is out of bounds for has_rent_epoch. whether the account meta has rent epoch
Sourcepub fn set_has_rent_epoch_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_has_rent_epoch_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of has_rent_epoch to the given value.
#Errors
If the given value is out of bounds for has_rent_epoch. whether the account meta has rent epoch
Sourcepub fn executable(&self) -> <bool as Specifier>::InOut
pub fn executable(&self) -> <bool as Specifier>::InOut
Returns the value of executable. whether the account is executable
Sourcepub fn executable_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn executable_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of executable.
#Errors
If the returned value contains an invalid bit pattern for executable. whether the account is executable
Sourcepub fn with_executable(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_executable(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of executable set to the given value.
#Panics
If the given value is out of bounds for executable. whether the account is executable
Sourcepub fn with_executable_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_executable_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of executable set to the given value.
#Errors
If the given value is out of bounds for executable. whether the account is executable
Sourcepub fn set_executable(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_executable(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of executable to the given value.
#Panics
If the given value is out of bounds for executable. whether the account is executable
Sourcepub fn set_executable_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_executable_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of executable to the given value.
#Errors
If the given value is out of bounds for executable. whether the account is executable
Source§impl AccountMetaFlags
impl AccountMetaFlags
pub fn new_from(optional_fields: &AccountMetaOptionalFields) -> Self
Trait Implementations§
Source§impl Clone for AccountMetaFlags
impl Clone for AccountMetaFlags
Source§fn clone(&self) -> AccountMetaFlags
fn clone(&self) -> AccountMetaFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AccountMetaFlags
impl Debug for AccountMetaFlags
Source§impl Default for AccountMetaFlags
impl Default for AccountMetaFlags
Source§fn default() -> AccountMetaFlags
fn default() -> AccountMetaFlags
Source§impl PartialEq for AccountMetaFlags
impl PartialEq for AccountMetaFlags
impl Copy for AccountMetaFlags
impl Eq for AccountMetaFlags
impl Pod for AccountMetaFlags
impl StructuralPartialEq for AccountMetaFlags
Auto Trait Implementations§
impl Freeze for AccountMetaFlags
impl RefUnwindSafe for AccountMetaFlags
impl Send for AccountMetaFlags
impl Sync for AccountMetaFlags
impl Unpin for AccountMetaFlags
impl UnwindSafe for AccountMetaFlags
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
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self
.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more