| <!-- | 
 | SPDX-FileCopyrightText: The Apache Software Foundation | 
 |  | 
 | SPDX-License-Identifier: Apache-2.0 | 
 | --> | 
 |  | 
 | <!DOCTYPE html> | 
 | <html lang="en"> | 
 | <head> | 
 |   <title>Arrow.Scalar.cast</title> | 
 |   <meta name="viewport" content="width=device-width, initial-scale=1"> | 
 |  | 
 |   <meta charset="utf-8" /> | 
 |  | 
 |    | 
 |   <meta property="og:type" content="website"/> | 
 |  | 
 |    | 
 |  | 
 |    | 
 |   <meta priority="og:title" content="Arrow.Scalar.cast"/> | 
 |   <meta priority="og:description" content="Reference for Arrow.Scalar.cast"/> | 
 |   <meta name="twitter:title" content="Arrow.Scalar.cast"/> | 
 |   <meta name="twitter:description" content="Reference for Arrow.Scalar.cast"/> | 
 |  | 
 |  | 
 |    | 
 |   <meta name="twitter:card" content="summary"/> | 
 |  | 
 |    | 
 |    | 
 |    | 
 |    | 
 |  | 
 |   <link rel="stylesheet" href="style.css" type="text/css" /> | 
 |  | 
 |    | 
 |  | 
 |    | 
 |   <script src="urlmap.js"></script> | 
 |    | 
 |    | 
 |   <script src="fzy.js"></script> | 
 |   <script src="search.js"></script> | 
 |    | 
 |   <script src="main.js"></script> | 
 | </head> | 
 |  | 
 | <body> | 
 |   <div id="body-wrapper" tabindex="-1"> | 
 |  | 
 |     <nav class="sidebar devhelp-hidden"> | 
 |        | 
 |        | 
 |       <div class="search section"> | 
 |         <form id="search-form" autocomplete="off"> | 
 |           <input id="search-input" type="text" name="do-not-autocomplete" placeholder="Click, or press 's' to search" autocomplete="off"/> | 
 |         </form> | 
 |       </div> | 
 |        | 
 |       <div class="section namespace"> | 
 |         <h3><a href="index.html">Arrow</a></h3> | 
 |         <p>API Version: 1.0</p> | 
 |          | 
 |         <p>Library Version: 22.0.0</p> | 
 |          | 
 |       </div> | 
 |        | 
 | <div class="section"> | 
 |   <h5>Type</h5> | 
 |   <div class="links"> | 
 |     <a href="class.Scalar.html">Scalar</a> | 
 |   </div> | 
 | </div> | 
 | <div class="section"> | 
 |   <h5>Methods</h5> | 
 |   <div class="links"> | 
 |    | 
 |     <a class="method current" href="method.Scalar.cast.html">cast</a> | 
 |    | 
 |     <a class="method" href="method.Scalar.equal.html">equal</a> | 
 |    | 
 |     <a class="method" href="method.Scalar.equal_options.html">equal_options</a> | 
 |    | 
 |     <a class="method" href="method.Scalar.get_data_type.html">get_data_type</a> | 
 |    | 
 |     <a class="method" href="method.Scalar.is_valid.html">is_valid</a> | 
 |    | 
 |     <a class="method" href="method.Scalar.to_string.html">to_string</a> | 
 |    | 
 |   </div> | 
 | </div> | 
 |  | 
 |       <div class="section generator"> | 
 |         <p>Generated by <a href="https://gitlab.gnome.org/GNOME/gi-docgen">gi-docgen</a> 2023.1</p> | 
 |       </div> | 
 |     </nav> | 
 |  | 
 |     <button id="btn-to-top" class="hidden"><span class="up-arrow"></span></button> | 
 |  | 
 |      | 
 | <section id="main" class="content"> | 
 |   <header> | 
 |     <h3>Method</h3> | 
 |     <h1><a href="index.html">Arrow</a><span class="sep"></span><a href="class.Scalar.html">Scalar</a><span class="sep"></span>cast</h1> | 
 |   </header> | 
 |  | 
 |   <section> | 
 |     <div class="docblock"> | 
 |       <p><span class="emblem available">since: 5.0.0</span></p> | 
 |     </div> | 
 |  | 
 |     <div class="declaration toggle-wrapper"> | 
 |       <h4 style="display:flex;" id="declaration"> | 
 |         Declaration | 
 |         <a class="anchor" href="#declaration"></a> | 
 |          | 
 |         <a class="srclink" title="go to source location" href="https://github.com/apache/arrow/blob/main/c_glib/arrow-glib/scalar.h#L62">[src]</a> | 
 |          | 
 |       </h4> | 
 |  | 
 |       <div class="docblock c-decl"> | 
 |         <pre><code><div class="highlight"><pre><span></span><span class="n">GArrowScalar</span><span class="o">*</span> | 
 | <span class="n">garrow_scalar_cast</span><span class="w"> </span><span class="p">(</span> | 
 | <span class="w">  </span><span class="n">GArrowScalar</span><span class="o">*</span><span class="w"> </span><span class="n">scalar</span><span class="p">,</span> | 
 | <span class="w">  </span><span class="n">GArrowDataType</span><span class="o">*</span><span class="w"> </span><span class="n">data_type</span><span class="p">,</span> | 
 | <span class="w">  </span><span class="n">GArrowCastOptions</span><span class="o">*</span><span class="w"> </span><span class="n">options</span><span class="p">,</span> | 
 | <span class="w">  </span><span class="n">GError</span><span class="o">**</span><span class="w"> </span><span class="n">error</span> | 
 | <span class="p">)</span> | 
 | </pre></div> | 
 | </code></pre> | 
 |       </div> | 
 |     </div> | 
 |  | 
 |     <div class="description toggle-wrapper"> | 
 |       <h4 style="display:flex;" id="description"> | 
 |         Description | 
 |         <a class="anchor" href="#description"></a> | 
 |          | 
 |       </h4> | 
 |  | 
 |       <div class="docblock"> | 
 |         No description available. | 
 |       </div> | 
 |  | 
 |       <div class="docblock"> | 
 |          | 
 |         <p>Available since: 5.0.0</p> | 
 |          | 
 |          | 
 |          | 
 |          | 
 |       </div> | 
 |  | 
 |        | 
 |     </div> | 
 |  | 
 |      | 
 |     <div class="parameters toggle-wrapper"> | 
 |       <h4 id="parameters"> | 
 |         Parameters | 
 |         <a href="#parameters" class="anchor"></a> | 
 |       </h4> | 
 |  | 
 |       <div class="docblock"> | 
 |         <dl class="arguments"> | 
 |            | 
 |           <dt class="arg-name"><code>data_type</code></dt> | 
 |           <dd class="arg-description"> | 
 |             <p><em>Type:</em> <a href="class.DataType.html"><code>GArrowDataType</code></a></p> | 
 |             <p><p>A <code>GArrowDataType</code> of the casted scalar.</p></p> | 
 |             <table> | 
 |              | 
 |              | 
 |              | 
 |              | 
 |              | 
 |              | 
 |              | 
 |             <tr><td title="transfer: none">The data is owned by the caller of the function.</td></tr> | 
 |              | 
 |             </table> | 
 |           </dd> | 
 |            | 
 |           <dt class="arg-name"><code>options</code></dt> | 
 |           <dd class="arg-description"> | 
 |             <p><em>Type:</em> <a href="class.CastOptions.html"><code>GArrowCastOptions</code></a></p> | 
 |             <p><p>A <code>GArrowCastOptions</code>.</p></p> | 
 |             <table> | 
 |              | 
 |             <tr><td>The argument can be <code>NULL</code>.</td></tr> | 
 |              | 
 |              | 
 |              | 
 |              | 
 |              | 
 |             <tr><td title="transfer: none">The data is owned by the caller of the function.</td></tr> | 
 |              | 
 |             </table> | 
 |           </dd> | 
 |            | 
 |  | 
 |            | 
 |           <dt class="arg-name"><code>error</code></dt> | 
 |           <dd class="arg-description"> | 
 |             <p><em>Type:</em> <a href="javascript:void(0)" data-namespace="GLib" data-link="struct.Error.html" class="external"><code>GError **</code></a></p> | 
 |             <p>The return location for <a href="https://docs.gtk.org/glib/error-reporting.html#rules-for-use-of-gerror">a recoverable error</a>.</p> | 
 |             <table> | 
 |               <tr><td>The argument can be <code>NULL</code>.</td></tr> | 
 |               <tr><td>If the return location is not <code>NULL</code>, then you must initialize it to a <code>NULL</code> <code>GError*</code>.</td></tr> | 
 |               <tr><td>The argument will left initialized to <code>NULL</code> by the method if there are no errors.</td></tr> | 
 |               <tr><td>In case of error, the argument will be set to a newly allocated <code>GError</code>; the caller will take ownership of the data, and be responsible for freeing it.</td></tr> | 
 |             </table> | 
 |           </dd> | 
 |            | 
 |         </dl> | 
 |       </div> | 
 |     </div> | 
 |      | 
 |  | 
 |      | 
 |     <div class="return-value toggle-wrapper"> | 
 |       <h4 id="return-value"> | 
 |         Return value | 
 |         <a href="#return-value" class="anchor"></a> | 
 |       </h4> | 
 |  | 
 |       <div class="docblock"> | 
 |         <div class="returns"> | 
 |           <div class="arg-description"> | 
 |             <p><em>Type:</em> <a href="class.Scalar.html"><code>GArrowScalar</code></a></p> | 
 |             <p><p>A newly created casted scalar on success, <code>NULL</code> on error.</p></p> | 
 |           </div> | 
 |           <div> | 
 |             <table> | 
 |              | 
 |              | 
 |              | 
 |             <tr><td title="transfer: full">The caller of the method takes ownership of the data, and is responsible for freeing it.</td></tr> | 
 |             <tr><td>The return value can be <code>NULL</code>.</td></tr> | 
 |              | 
 |             </table> | 
 |           </div> | 
 |         </div> | 
 |       </div> | 
 |     </div> | 
 |      | 
 |  | 
 |   </section> | 
 | </section> | 
 |  | 
 |  | 
 |      | 
 |  | 
 |     <section id="search" class="content hidden"></section> | 
 |  | 
 |     <footer> | 
 |      | 
 |     </footer> | 
 |   </div> | 
 | </body> | 
 | </html> |