/// Runs an initialization function,even if the ROnce is poisoned.
///
/// This will keep trying to run different closures until one of them doesn't panic.
///
/// The ROnceState parameter describes whether the ROnce is New or Poisoned.
///
///
/// # Example
///
/// ```
/// use abi_stable::external_types::ROnce;
///
/// use std::panic::{self, AssertUnwindSafe};
///
/// let once = ROnce::new();
/// let mut counter = 0usize;
///
/// for i in 0..100 {
///     let _ = panic::catch_unwind(AssertUnwindSafe(|| {
///         once.call_once_force(|_| {
///             if i < 6 {
///                 panic!();
///             }
///             counter = i;
///         })
///     }));
/// }
///
/// assert_eq!(counter, 6);
///
/// ```
Runs an initialization function,even if the ROnce is poisoned.
This will keep trying to run different closures until one of them doesn't panic.

The ROnceState parameter describes whether the ROnce is New or Poisoned.
Runs an initialization function even if the ROnce is poisoned . This will keep trying to run different closures until one of them doesn ' t panic . The ROnceState parameter describes whether the ROnce is New or Poisoned .
pub fn call_once_force<F>(&self, f: F)
    where
        F: FnOnce(ROnceState),
    {
        let mut closure = Closure::with_state(f);
        let func = closure.func;
        let res = unsafe {
            self.vtable().call_once_force()(
                &self.opaque_once,
                RMut::new(&mut closure).transmute::<ErasedClosure>(),
                func,
            )
        };
        if let Err(e) = closure.panic {
            panic::resume_unwind(e);
        }
        if let RErr(()) = res {
            panic!("This ROnce instantce is poisoned.");
        }
    }
pub fn call_once_force < F > ( & self , f : F ) where F : FnOnce ( ROnceState ) , { let mut closure = Closure :: with_state ( f ) ; let func = closure . func ; let res = unsafe { self . vtable ( ) . call_once_force ( ) ( & self . opaque_once , RMut :: new ( & mut closure ) . transmute :: < ErasedClosure > ( ) , func , ) } ; if let Err ( e ) = closure . panic { panic :: resume_unwind ( e ) ; } if let RErr ( ( ) ) = res { panic ! ( " " ) ; } }
Runs an initialization function,even if the ROnce is poisoned.
Runs an initialization function even if the ROnce is poisoned .
&self
f
F
example
```
use abi_stable::external_types::ROnce.

use std::panic::{self, AssertUnwindSafe}.

let once = ROnce::new();
let mut counter = 0usize.



assert_eq!(counter, 6).


` ` ` use abi_stable :: external_types :: ROnce . use std :: panic :: { self AssertUnwindSafe } . let once = ROnce :: new () ; let mut counter = 0usize . assert_eq! ( counter 6 ) .