[−][src]Struct solana_runtime::accounts_index::WriteAccountMapEntryTryBuilder
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:
Field | 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_> |
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<RwLockWriteGuard<'this, SlotList<T>>, Error_>, Error_> WriteAccountMapEntryTryBuilder<T, SlotListGuardBuilder_, Error_>
[src]
pub fn try_build(self) -> Result<WriteAccountMapEntry<T>, Error_>
[src]
Calls WriteAccountMapEntry::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<WriteAccountMapEntry<T>, (Error_, Heads<T>)>
[src]
self
) -> Result<WriteAccountMapEntry<T>, (Error_, Heads<T>)>
Calls WriteAccountMapEntry::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 WriteAccountMapEntryTryBuilder<T, SlotListGuardBuilder_, Error_> where
SlotListGuardBuilder_: RefUnwindSafe,
SlotListGuardBuilder_: RefUnwindSafe,
impl<T, SlotListGuardBuilder_, Error_> Send for WriteAccountMapEntryTryBuilder<T, SlotListGuardBuilder_, Error_> where
SlotListGuardBuilder_: Send,
T: Send + Sync,
SlotListGuardBuilder_: Send,
T: Send + Sync,
impl<T, SlotListGuardBuilder_, Error_> Sync for WriteAccountMapEntryTryBuilder<T, SlotListGuardBuilder_, Error_> where
SlotListGuardBuilder_: Sync,
T: Send + Sync,
SlotListGuardBuilder_: Sync,
T: Send + Sync,
impl<T, SlotListGuardBuilder_, Error_> Unpin for WriteAccountMapEntryTryBuilder<T, SlotListGuardBuilder_, Error_> where
SlotListGuardBuilder_: Unpin,
SlotListGuardBuilder_: Unpin,
impl<T, SlotListGuardBuilder_, Error_> UnwindSafe for WriteAccountMapEntryTryBuilder<T, SlotListGuardBuilder_, Error_> where
SlotListGuardBuilder_: UnwindSafe,
SlotListGuardBuilder_: UnwindSafe,
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>,