[][src]Struct solana_runtime::accounts_index::ReadAccountMapEntryTryBuilder

pub struct ReadAccountMapEntryTryBuilder<T: 'static, SlotListGuardBuilder_: for<'this> FnOnce(&'this <Arc<AccountMapEntryInner<T>> as Deref>::Target) -> Result<RwLockReadGuard<'this, SlotList<T>>, Error_>, Error_> {
    pub owned_entry: Arc<AccountMapEntryInner<T>>,
    pub slot_list_guard_builder: SlotListGuardBuilder_,
}

A more verbose but stable way to construct self-referencing structs. It is comparable to using StructName { field1: value1, field2: value2 } rather than StructName::new(value1, value2). This has the dual benefit of makin your code both easier to refactor and more readable. Call try_build() or try_build_or_recover() to construct the actual struct. The fields of this struct should be used as follows:

FieldSuggested Use
owned_entryDirectly pass in the value this field should contain
slot_list_guard_builderUse a function or closure: (owned_entry: &_) -> Result<slot_list_guard: _, Error_>

Fields

owned_entry: Arc<AccountMapEntryInner<T>>slot_list_guard_builder: SlotListGuardBuilder_

Implementations

impl<T: 'static, SlotListGuardBuilder_: for<'this> FnOnce(&'this <Arc<AccountMapEntryInner<T>> as Deref>::Target) -> Result<RwLockReadGuard<'this, SlotList<T>>, Error_>, Error_> ReadAccountMapEntryTryBuilder<T, SlotListGuardBuilder_, Error_>[src]

pub fn try_build(self) -> Result<ReadAccountMapEntry<T>, Error_>[src]

Calls ReadAccountMapEntry::try_new() using the provided values. This is preferrable over calling try_new() directly for the reasons listed above.

pub fn try_build_or_recover(
    self
) -> Result<ReadAccountMapEntry<T>, (Error_, Heads<T>)>
[src]

Calls ReadAccountMapEntry::try_new_or_recover() using the provided values. This is preferrable over calling try_new_or_recover() directly for the reasons listed above.

Auto Trait Implementations

impl<T, SlotListGuardBuilder_, Error_> RefUnwindSafe for ReadAccountMapEntryTryBuilder<T, SlotListGuardBuilder_, Error_> where
    SlotListGuardBuilder_: RefUnwindSafe

impl<T, SlotListGuardBuilder_, Error_> Send for ReadAccountMapEntryTryBuilder<T, SlotListGuardBuilder_, Error_> where
    SlotListGuardBuilder_: Send,
    T: Send + Sync

impl<T, SlotListGuardBuilder_, Error_> Sync for ReadAccountMapEntryTryBuilder<T, SlotListGuardBuilder_, Error_> where
    SlotListGuardBuilder_: Sync,
    T: Send + Sync

impl<T, SlotListGuardBuilder_, Error_> Unpin for ReadAccountMapEntryTryBuilder<T, SlotListGuardBuilder_, Error_> where
    SlotListGuardBuilder_: Unpin

impl<T, SlotListGuardBuilder_, Error_> UnwindSafe for ReadAccountMapEntryTryBuilder<T, SlotListGuardBuilder_, Error_> where
    SlotListGuardBuilder_: UnwindSafe

Blanket Implementations

impl<T> AbiExample for T[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

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]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,