pub struct MapInitError<I, F, E, Mode = InitMode> { /* private fields */ }Expand description
错误映射后的初始化器。 An initializer wrapper that converts the underlying initializer’s error.
只有初始化失败时才调用映射闭包;成功时保留原始析构凭证。 The mapping closure runs only on failure; on success, the original destruction receipt is preserved.
Trait Implementations§
Source§impl<T, E1, E2, I, F, Mode> Init<T, E2, Mode> for MapInitError<I, F, E1, Mode>
impl<T, E1, E2, I, F, Mode> Init<T, E2, Mode> for MapInitError<I, F, E1, Mode>
Source§fn initialize<'slot>(
self,
slot: InitSlot<'slot, T, Mode>,
) -> Result<InitReceipt<'slot, T, Mode>, E2>
fn initialize<'slot>( self, slot: InitSlot<'slot, T, Mode>, ) -> Result<InitReceipt<'slot, T, Mode>, E2>
消耗目标槽位并返回已初始化值的析构凭证。
Consume the target slot and return a destruction receipt for the initialized value.
Auto Trait Implementations§
impl<I, F, E, Mode> Freeze for MapInitError<I, F, E, Mode>
impl<I, F, E, Mode> RefUnwindSafe for MapInitError<I, F, E, Mode>where
I: RefUnwindSafe,
F: RefUnwindSafe,
PhantomData<fn(E)>: RefUnwindSafe,
PhantomData<fn() -> Mode>: RefUnwindSafe,
impl<I, F, E, Mode> Send for MapInitError<I, F, E, Mode>
impl<I, F, E, Mode> Sync for MapInitError<I, F, E, Mode>
impl<I, F, E, Mode> Unpin for MapInitError<I, F, E, Mode>
impl<I, F, E, Mode> UnsafeUnpin for MapInitError<I, F, E, Mode>where
I: UnsafeUnpin,
F: UnsafeUnpin,
PhantomData<fn(E)>: UnsafeUnpin,
PhantomData<fn() -> Mode>: UnsafeUnpin,
impl<I, F, E, Mode> UnwindSafe for MapInitError<I, F, E, Mode>where
I: UnwindSafe,
F: UnwindSafe,
PhantomData<fn(E)>: UnwindSafe,
PhantomData<fn() -> Mode>: UnwindSafe,
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
Mutably borrows from an owned value. Read more