[][src]Struct solana_runtime::accounts_index::ReadAccountMapEntryBuilder

pub struct ReadAccountMapEntryBuilder<T: 'static, SlotListGuardBuilder_: for<'this> FnOnce(&'this <Arc<AccountMapEntryInner<T>> as Deref>::Target) -> RwLockReadGuard<'this, SlotList<T>>> {
    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 making your code both easier to refactor and more readable. Call build() 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: &_) -> slot_list_guard: _

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) -> RwLockReadGuard<'this, SlotList<T>>> ReadAccountMapEntryBuilder<T, SlotListGuardBuilder_>[src]

pub fn build(self) -> ReadAccountMapEntry<T>[src]

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

Auto Trait Implementations

impl<T, SlotListGuardBuilder_> RefUnwindSafe for ReadAccountMapEntryBuilder<T, SlotListGuardBuilder_> where
    SlotListGuardBuilder_: RefUnwindSafe

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

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

impl<T, SlotListGuardBuilder_> Unpin for ReadAccountMapEntryBuilder<T, SlotListGuardBuilder_> where
    SlotListGuardBuilder_: Unpin

impl<T, SlotListGuardBuilder_> UnwindSafe for ReadAccountMapEntryBuilder<T, SlotListGuardBuilder_> 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>,