pub(crate) fn try_current() -> Option<(*const Journal<A>, *mut i32)>
    where
        Self: Sized,
    {
        unsafe {
            let tid = std::thread::current().id();
            A::journals(|journals| {
                if !journals.contains_key(&tid) {
                    None
                } else {
                    if let Some((j, c)) = journals.get_mut(&tid) {
                        Some((Ptr::<Self, A>::from_off_unchecked(*j).as_ptr(), c as *mut i32))
                    } else {
                        None
                    }
                }
            })
        }
    }
/// Returns a journal for the current thread. If there is no `Journal`
/// object for the running thread, it may create a new journal and returns
/// its mutable reference. Each thread may have only one journal.
Returns a journal for the current thread. If there is no `Journal`
object for the running thread, it may create a new journal and returns
its mutable reference. Each thread may have only one journal.
Returns a journal for the current thread . If there is no ` Journal ` object for the running thread it may create a new journal and returns its mutable reference . Each thread may have only one journal .
pub(crate) fn try_current() -> Option<(*const Journal<A>, *mut i32)>
    where
        Self: Sized,
    {
        unsafe {
            let tid = std::thread::current().id();
            A::journals(|journals| {
                if !journals.contains_key(&tid) {
                    None
                } else {
                    if let Some((j, c)) = journals.get_mut(&tid) {
                        Some((Ptr::<Self, A>::from_off_unchecked(*j).as_ptr(), c as *mut i32))
                    } else {
                        None
                    }
                }
            })
        }
    }
pub ( crate ) fn try_current ( ) -> Option < ( * const Journal < A > , * mut i32 ) > where Self : Sized , { unsafe { let tid = std :: thread :: current ( ) . id ( ) ; A :: journals ( | journals | { if ! journals . contains_key ( & tid ) { None } else { if let Some ( ( j , c ) ) = journals . get_mut ( & tid ) { Some ( ( Ptr :: < Self , A > :: from_off_unchecked ( * j ) . as_ptr ( ) , c as * mut i32 ) ) } else { None } } } ) } }
Returns a journal for the current thread.
Returns a journal for the current thread .