pub struct InitializationFailure { /* private fields */ }Expand description
Retains a created handle and its library when automatic rollback is impossible. The native object still needs explicit cleanup; dropping this error performs no destruction. Keep its parent and original allocator callback state alive.
Implementations§
Source§impl InitializationFailure
impl InitializationFailure
Sourcepub fn handle(&self) -> CreatedHandle
pub fn handle(&self) -> CreatedHandle
Native object retained by this failure. Do not create duplicate owners.
Sourcepub fn missing_command(&self) -> &'static str
pub fn missing_command(&self) -> &'static str
Required command whose absence prevented wrapper initialization.
Sourcepub unsafe fn destroy(
self,
allocator: Option<&AllocationCallbacks>,
) -> Result<(), Self>
pub unsafe fn destroy( self, allocator: Option<&AllocationCallbacks>, ) -> Result<(), Self>
Retry explicit cleanup; on failure return the same owner for further recovery. No submission or wait is performed.
§Safety
The native object and its parents must still be live, with no children or outstanding operations. Callbacks must match creation and remain valid. Do not separately destroy the exposed handle before calling this method.
Trait Implementations§
Source§impl Debug for InitializationFailure
impl Debug for InitializationFailure
Source§impl Display for InitializationFailure
impl Display for InitializationFailure
Source§impl Error for InitializationFailure
impl Error for InitializationFailure
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for InitializationFailure
impl RefUnwindSafe for InitializationFailure
impl Send for InitializationFailure
impl Sync for InitializationFailure
impl Unpin for InitializationFailure
impl UnsafeUnpin for InitializationFailure
impl UnwindSafe for InitializationFailure
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