\hypertarget{struct__Eina__Future__Desc}{}\doxysection{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc Struct Reference}
\label{struct__Eina__Future__Desc}\index{\_Eina\_Future\_Desc@{\_Eina\_Future\_Desc}}
\doxysubsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__Eina__Promise_gad3a38a209f2112fbe1eb111e0d3ff939}{Eina\+\_\+\+Future\+\_\+\+Cb}} \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{cb}}
\begin{DoxyCompactList}\small\item\em Called when the future is resolved or rejected. \end{DoxyCompactList}\item 
const void $\ast$ \mbox{\hyperlink{struct__Eina__Future__Desc_a3776d82a99776d2b6a96839c6191bc13}{data}}
\begin{DoxyCompactList}\small\item\em Context data to {\ttfamily cb}. \end{DoxyCompactList}\item 
Eina\+\_\+\+Future $\ast$$\ast$ \mbox{\hyperlink{struct__Eina__Future__Desc_afdce5683a20c045e4400cbbe7e0da9d4}{storage}}
\begin{DoxyCompactList}\small\item\em The storage will be used by Eina to store a pointer to the created future. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
A struct used to define a callback and data for a future.

This struct contains a future completion callback and a data to the future completion callback which is used by \mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()}}, \mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()}} and friends to inform the user about the future result. The \mbox{\hyperlink{struct__Eina__Future__Desc_a3776d82a99776d2b6a96839c6191bc13}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::data}} variable should be freed when \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}} is called, otherwise it will leak.

\begin{DoxyNote}{Note}
If \mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()}}, \mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()}} and friends fails to return a valid future (in other words\+: {\ttfamily N\+U\+LL} is returned) the \mbox{\hyperlink{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}} will be called report an error like {\ttfamily E\+I\+N\+V\+AL} or {\ttfamily E\+N\+O\+M\+EM} so \mbox{\hyperlink{struct__Eina__Future__Desc_a3776d82a99776d2b6a96839c6191bc13}{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::data}} can be freed.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()}} 

\mbox{\hyperlink{group__Eina__Future_ga74c9d6017478584a85b8e3914083c728}{eina\+\_\+future\+\_\+chain\+\_\+array()}} 

\mbox{\hyperlink{group__Eina__Future_gade0da31ea96e8461ec403f7492240041}{eina\+\_\+future\+\_\+cb\+\_\+convert\+\_\+to()}} 

\mbox{\hyperlink{group__Eina__Future_ga068c74621a75ee8e1862b57565a50106}{eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc()}} 

\mbox{\hyperlink{group__Eina__Future_ga706f9f0e5c6fc1d1b5e066d6c1f48eda}{eina\+\_\+future\+\_\+cb\+\_\+ignore\+\_\+error()}} 

\mbox{\hyperlink{group__Eina__Future_gaad0c23b540f1424301d2609a35ef8eac}{eina\+\_\+future\+\_\+cb\+\_\+easy\+\_\+from\+\_\+desc()}} 

\mbox{\hyperlink{group__Eina__Future_ga9b9ab27d34a567e47b34a888d8fb6fa2}{eina\+\_\+future\+\_\+cb\+\_\+log\+\_\+from\+\_\+desc()}} 
\end{DoxySeeAlso}


\doxysubsection{Field Documentation}
\mbox{\Hypertarget{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}\label{struct__Eina__Future__Desc_a539cbfa26204bdf1aae7bdcfa6f15d09}} 
\index{\_Eina\_Future\_Desc@{\_Eina\_Future\_Desc}!cb@{cb}}
\index{cb@{cb}!\_Eina\_Future\_Desc@{\_Eina\_Future\_Desc}}
\doxysubsubsection{\texorpdfstring{cb}{cb}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Promise_gad3a38a209f2112fbe1eb111e0d3ff939}{Eina\+\_\+\+Future\+\_\+\+Cb}} \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::cb}



Called when the future is resolved or rejected. 

Once a future is resolved or rejected this function is called passing the future result to inform the user that the future operation has ended. Normally this function is called from a safe context (main loop or some platform defined safe context), however in case of a future cancellation (eina\+\_\+future\+\_\+cancel()) or if \mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()}}, \mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()}} and friends fails to create a new future, this function is called from the current context.

Use this function to free {\ttfamily data} if necessary. \begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Future_gaeb721d890aa5eac3103a982edde76e9a}{eina\+\_\+future\+\_\+chain()}} 

\mbox{\hyperlink{group__Eina__Future_ga9f4948790f1f84de93ba8195520d4a92}{eina\+\_\+future\+\_\+then()}} 

eina\+\_\+future\+\_\+cancel() 
\end{DoxySeeAlso}


Referenced by eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc(), eina\+\_\+future\+\_\+cb\+\_\+convert\+\_\+to(), eina\+\_\+future\+\_\+chain\+\_\+array(), and eina\+\_\+future\+\_\+new().

\mbox{\Hypertarget{struct__Eina__Future__Desc_a3776d82a99776d2b6a96839c6191bc13}\label{struct__Eina__Future__Desc_a3776d82a99776d2b6a96839c6191bc13}} 
\index{\_Eina\_Future\_Desc@{\_Eina\_Future\_Desc}!data@{data}}
\index{data@{data}!\_Eina\_Future\_Desc@{\_Eina\_Future\_Desc}}
\doxysubsubsection{\texorpdfstring{data}{data}}
{\footnotesize\ttfamily const void$\ast$ \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::data}



Context data to {\ttfamily cb}. 

The {\ttfamily data} should be freed inside {\ttfamily cb}, otherwise its memory will leak! 

Referenced by eina\+\_\+future\+\_\+cb\+\_\+console\+\_\+from\+\_\+desc().

\mbox{\Hypertarget{struct__Eina__Future__Desc_afdce5683a20c045e4400cbbe7e0da9d4}\label{struct__Eina__Future__Desc_afdce5683a20c045e4400cbbe7e0da9d4}} 
\index{\_Eina\_Future\_Desc@{\_Eina\_Future\_Desc}!storage@{storage}}
\index{storage@{storage}!\_Eina\_Future\_Desc@{\_Eina\_Future\_Desc}}
\doxysubsubsection{\texorpdfstring{storage}{storage}}
{\footnotesize\ttfamily Eina\+\_\+\+Future$\ast$$\ast$ \+\_\+\+Eina\+\_\+\+Future\+\_\+\+Desc\+::storage}



The storage will be used by Eina to store a pointer to the created future. 

It can be {\ttfamily N\+U\+LL}. 