[−][src]Struct solana_runtime::accounts_index::ReadAccountMapEntry
Implementations
impl<T: 'static> ReadAccountMapEntry<T>
[src]
pub fn new(
owned_entry: Arc<AccountMapEntryInner<T>>,
slot_list_guard_builder: impl for<'this> FnOnce(&'this <Arc<AccountMapEntryInner<T>> as Deref>::Target) -> RwLockReadGuard<'this, SlotList<T>>
) -> Self
[src]
owned_entry: Arc<AccountMapEntryInner<T>>,
slot_list_guard_builder: impl for<'this> FnOnce(&'this <Arc<AccountMapEntryInner<T>> as Deref>::Target) -> RwLockReadGuard<'this, SlotList<T>>
) -> Self
Constructs a new instance of this self-referential struct. (See also ReadAccountMapEntryBuilder::build()
). Each argument is a field of the new struct. Fields that refer to other fields inside the struct are initialized using functions instead of directly passing their value. The arguments are as follows:
Argument | Suggested Use |
---|---|
owned_entry | Directly pass in the value this field should contain |
slot_list_guard_builder | Use a function or closure: (owned_entry: &_) -> slot_list_guard: _ |
pub fn try_new<Error_>(
owned_entry: Arc<AccountMapEntryInner<T>>,
slot_list_guard_builder: impl for<'this> FnOnce(&'this <Arc<AccountMapEntryInner<T>> as Deref>::Target) -> Result<RwLockReadGuard<'this, SlotList<T>>, Error_>
) -> Result<Self, Error_>
[src]
owned_entry: Arc<AccountMapEntryInner<T>>,
slot_list_guard_builder: impl for<'this> FnOnce(&'this <Arc<AccountMapEntryInner<T>> as Deref>::Target) -> Result<RwLockReadGuard<'this, SlotList<T>>, Error_>
) -> Result<Self, Error_>
(See also ReadAccountMapEntryTryBuilder::try_build()
.) Like new
, but builders for self-referencing fields can return results. If any of them fail, Err
is returned. If all of them succeed, Ok
is returned. The arguments are as follows:
Argument | Suggested Use |
---|---|
owned_entry | Directly pass in the value this field should contain |
slot_list_guard_builder | Use a function or closure: (owned_entry: &_) -> Result<slot_list_guard: _, Error_> |
pub fn try_new_or_recover<Error_>(
owned_entry: Arc<AccountMapEntryInner<T>>,
slot_list_guard_builder: impl for<'this> FnOnce(&'this <Arc<AccountMapEntryInner<T>> as Deref>::Target) -> Result<RwLockReadGuard<'this, SlotList<T>>, Error_>
) -> Result<Self, (Error_, Heads<T>)>
[src]
owned_entry: Arc<AccountMapEntryInner<T>>,
slot_list_guard_builder: impl for<'this> FnOnce(&'this <Arc<AccountMapEntryInner<T>> as Deref>::Target) -> Result<RwLockReadGuard<'this, SlotList<T>>, Error_>
) -> Result<Self, (Error_, Heads<T>)>
(See also ReadAccountMapEntryTryBuilder::try_build_or_recover()
.) Like try_new
, but all head fields are returned in the case of an error. The arguments are as follows:
Argument | Suggested Use |
---|---|
owned_entry | Directly pass in the value this field should contain |
slot_list_guard_builder | Use a function or closure: (owned_entry: &_) -> Result<slot_list_guard: _, Error_> |
pub fn with_owned_entry_contents<'outer_borrow, ReturnType>(
&'outer_borrow self,
user: impl for<'this> FnOnce(&'outer_borrow <Arc<AccountMapEntryInner<T>> as Deref>::Target) -> ReturnType
) -> ReturnType
[src]
&'outer_borrow self,
user: impl for<'this> FnOnce(&'outer_borrow <Arc<AccountMapEntryInner<T>> as Deref>::Target) -> ReturnType
) -> ReturnType
Provides limited immutable access to the contents of owned_entry
. This method was generated because owned_entry
is immutably borrowed by other fields.
pub fn with_slot_list_guard<'outer_borrow, ReturnType>(
&'outer_borrow self,
user: impl for<'this> FnOnce(&'outer_borrow RwLockReadGuard<'this, SlotList<T>>) -> ReturnType
) -> ReturnType
[src]
&'outer_borrow self,
user: impl for<'this> FnOnce(&'outer_borrow RwLockReadGuard<'this, SlotList<T>>) -> ReturnType
) -> ReturnType
Provides an immutable reference to slot_list_guard
. This method was generated because slot_list_guard
is a tail field.
pub fn with_slot_list_guard_mut<'outer_borrow, ReturnType>(
&'outer_borrow mut self,
user: impl for<'this> FnOnce(&'outer_borrow mut RwLockReadGuard<'this, SlotList<T>>) -> ReturnType
) -> ReturnType
[src]
&'outer_borrow mut self,
user: impl for<'this> FnOnce(&'outer_borrow mut RwLockReadGuard<'this, SlotList<T>>) -> ReturnType
) -> ReturnType
Provides a mutable reference to slot_list_guard
. This method was generated because slot_list_guard
is a tail field.
pub fn with<'outer_borrow, ReturnType>(
&'outer_borrow self,
user: impl for<'this> FnOnce(BorrowedFields<'outer_borrow, 'this, T>) -> ReturnType
) -> ReturnType
[src]
&'outer_borrow self,
user: impl for<'this> FnOnce(BorrowedFields<'outer_borrow, 'this, T>) -> ReturnType
) -> ReturnType
This method provides immutable references to all tail and immutably borrowed fields.
pub fn with_mut<'outer_borrow, ReturnType>(
&'outer_borrow mut self,
user: impl for<'this> FnOnce(BorrowedMutFields<'outer_borrow, 'this, T>) -> ReturnType
) -> ReturnType
[src]
&'outer_borrow mut self,
user: impl for<'this> FnOnce(BorrowedMutFields<'outer_borrow, 'this, T>) -> ReturnType
) -> ReturnType
This method provides mutable references to all tail fields.
pub fn into_heads(self) -> Heads<T>
[src]
This function drops all internally referencing fields and returns only the head fields of this struct.
impl<T: Clone> ReadAccountMapEntry<T>
[src]
pub fn from_account_map_entry(
account_map_entry: Arc<AccountMapEntryInner<T>>
) -> Self
[src]
account_map_entry: Arc<AccountMapEntryInner<T>>
) -> Self
pub fn slot_list(&self) -> &SlotList<T>
[src]
pub fn ref_count(&self) -> &AtomicU64
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for ReadAccountMapEntry<T>
impl<T> !Send for ReadAccountMapEntry<T>
impl<T> Sync for ReadAccountMapEntry<T> where
T: Send + Sync,
T: Send + Sync,
impl<T> Unpin for ReadAccountMapEntry<T>
impl<T> UnwindSafe for ReadAccountMapEntry<T>
Blanket Implementations
impl<T> AbiExample for T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,