/// Try to unwrap JsonString from an entry of type ZomeApiResult<Some<App(AppEntryType, JsonString)>> 
/// and then parse JsonString into type T.
/// 
/// ## Returns
/// 
/// - `Ok(ZomeApiResult<T>)` if entry was correct type and it was possible to convert JsonString to T.
/// - `Err('entry not found')` if entry was ZomeApiResult::Ok(None)
/// - `Err('entry found but not Entry::App')` if entry was not type of ZomeApiResult<Some<App(AppEntryType, JsonString)>>
/// - `Err('entry found but but not convertible to T')` if entry of type ZomeApiResult<Some<App(AppEntryType, JsonString)>> found 
///    but JsonString cannot be covert to T
Try to unwrap JsonString from an entry of type ZomeApiResult>
and then parse JsonString into type T.
Try to unwrap JsonString from an entry of type ZomeApiResult > and then parse JsonString into type T .
fn unwrap_entry_as<T: serde::de::DeserializeOwned>(entry: ZomeApiResult<Option<Entry>>) -> ZomeApiResult<T> {
    match entry {
        ZomeApiResult::Ok(None) => {
            new_error("entry not found")
        }
        // Entry value is wrapped in App
        ZomeApiResult::Ok(Some(Entry::App(_t, json))) => { 
            let asset : Result<T, _> = serde_json::from_str(r#json.to_string().as_ref());
            match asset {
                Ok(a) => { 
                    Ok(a) 
                }
                _ => new_error("entry found but but not convertible to T")
            }
        }
        _ => {
            new_error("entry found but not Entry::App")
        }
    }
}
fn unwrap_entry_as < T : serde :: de :: DeserializeOwned > ( entry : ZomeApiResult < Option < Entry > > ) -> ZomeApiResult < T > { match entry { ZomeApiResult :: Ok ( None ) => { new_error ( " " ) } // Entry value is wrapped in App ZomeApiResult :: Ok ( Some ( Entry :: App ( _t , json ) ) ) => { let asset : Result < T , _ > = serde_json :: from_str ( r#json . to_string ( ) . as_ref ( ) ) ; match asset { Ok ( a ) => { Ok ( a ) } _ => new_error ( " " ) } } _ => { new_error ( " " ) } } }
Try to unwrap JsonString from an entry of type ZomeApiResult<Some<App(AppEntryType, JsonString)>>
and then parse JsonString into type T.
Try to unwrap JsonString from an entry of type ZomeApiResult<Some<App ( AppEntryType JsonString ) >> and then parse JsonString into type T .
if entry was correct type and it was possible to convert JsonString to T.
if entry was correct type and it was possible to convert JsonString to T .
k(ZomeApiResult<T>
if entry was ZomeApiResult::Ok(None)
if entry was ZomeApiResult :: Ok ( None )
rr('entry not found'
if entry was not type of ZomeApiResult>
if entry was not type of ZomeApiResult >
rr('entry found but not Entry::App'
if entry of type ZomeApiResult> found
but JsonString cannot be covert to T
if entry of type ZomeApiResult > found but JsonString cannot be covert to T
rr('entry found but but not convertible to T'
entry
ZomeApiResult<Option<Entry>>