deploy: de38ae62916547ad097c066f94a32e9ba7790eeb

This commit is contained in:
NotAShelf 2025-02-05 00:10:33 +00:00
commit 9a86359447
28502 changed files with 1261284 additions and 0 deletions

24
ryu/raw/fn.format32.html Normal file
View file

@ -0,0 +1,24 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Print f32 to the given buffer and return number of bytes written."><title>format32 in ryu::raw - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ryu" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ryu/index.html">ryu</a><span class="version">1.0.18</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">format32</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#special-cases" title="Special cases">Special cases</a></li><li><a href="#safety" title="Safety">Safety</a></li><li><a href="#example" title="Example">Example</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In ryu::<wbr>raw</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">ryu</a>::<wbr><a href="index.html">raw</a></span><h1>Function <span class="fn">format32</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/ryu/pretty/mod.rs.html#159-224">Source</a> </span></div><pre class="rust item-decl"><code>pub unsafe fn format32(f: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.f32.html">f32</a>, result: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.pointer.html">*mut </a><a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.u8.html">u8</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.usize.html">usize</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Print f32 to the given buffer and return number of bytes written.</p>
<p>At most 16 bytes will be written.</p>
<h3 id="special-cases"><a class="doc-anchor" href="#special-cases">§</a>Special cases</h3>
<p>This function <strong>does not</strong> check for NaN or infinity. If the input
number is not a finite float, the printed representation will be some
correctly formatted but unspecified numerical value.</p>
<p>Please check <a href="https://doc.rust-lang.org/std/primitive.f32.html#method.is_finite"><code>is_finite</code></a> yourself before calling this function, or
check <a href="https://doc.rust-lang.org/std/primitive.f32.html#method.is_nan"><code>is_nan</code></a> and <a href="https://doc.rust-lang.org/std/primitive.f32.html#method.is_infinite"><code>is_infinite</code></a> and handle those cases yourself.</p>
<h3 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h3>
<p>The <code>result</code> pointer argument must point to sufficiently many writable bytes
to hold Ryūs representation of <code>f</code>.</p>
<h3 id="example"><a class="doc-anchor" href="#example">§</a>Example</h3>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::{mem::MaybeUninit, slice, str};
<span class="kw">let </span>f = <span class="number">1.234f32</span>;
<span class="kw">unsafe </span>{
<span class="kw">let </span><span class="kw-2">mut </span>buffer = [MaybeUninit::&lt;u8&gt;::uninit(); <span class="number">16</span>];
<span class="kw">let </span>len = ryu::raw::format32(f, buffer.as_mut_ptr() <span class="kw">as </span><span class="kw-2">*mut </span>u8);
<span class="kw">let </span>slice = slice::from_raw_parts(buffer.as_ptr() <span class="kw">as </span><span class="kw-2">*const </span>u8, len);
<span class="kw">let </span>print = str::from_utf8_unchecked(slice);
<span class="macro">assert_eq!</span>(print, <span class="string">"1.234"</span>);
}</code></pre></div>
</div></details></section></div></main></body></html>

24
ryu/raw/fn.format64.html Normal file
View file

@ -0,0 +1,24 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Print f64 to the given buffer and return number of bytes written."><title>format64 in ryu::raw - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ryu" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ryu/index.html">ryu</a><span class="version">1.0.18</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">format64</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#special-cases" title="Special cases">Special cases</a></li><li><a href="#safety" title="Safety">Safety</a></li><li><a href="#example" title="Example">Example</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In ryu::<wbr>raw</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">ryu</a>::<wbr><a href="index.html">raw</a></span><h1>Function <span class="fn">format64</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/ryu/pretty/mod.rs.html#52-118">Source</a> </span></div><pre class="rust item-decl"><code>pub unsafe fn format64(f: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.f64.html">f64</a>, result: <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.pointer.html">*mut </a><a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.u8.html">u8</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.1/core/primitive.usize.html">usize</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Print f64 to the given buffer and return number of bytes written.</p>
<p>At most 24 bytes will be written.</p>
<h3 id="special-cases"><a class="doc-anchor" href="#special-cases">§</a>Special cases</h3>
<p>This function <strong>does not</strong> check for NaN or infinity. If the input
number is not a finite float, the printed representation will be some
correctly formatted but unspecified numerical value.</p>
<p>Please check <a href="https://doc.rust-lang.org/std/primitive.f64.html#method.is_finite"><code>is_finite</code></a> yourself before calling this function, or
check <a href="https://doc.rust-lang.org/std/primitive.f64.html#method.is_nan"><code>is_nan</code></a> and <a href="https://doc.rust-lang.org/std/primitive.f64.html#method.is_infinite"><code>is_infinite</code></a> and handle those cases yourself.</p>
<h3 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h3>
<p>The <code>result</code> pointer argument must point to sufficiently many writable bytes
to hold Ryūs representation of <code>f</code>.</p>
<h3 id="example"><a class="doc-anchor" href="#example">§</a>Example</h3>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>std::{mem::MaybeUninit, slice, str};
<span class="kw">let </span>f = <span class="number">1.234f64</span>;
<span class="kw">unsafe </span>{
<span class="kw">let </span><span class="kw-2">mut </span>buffer = [MaybeUninit::&lt;u8&gt;::uninit(); <span class="number">24</span>];
<span class="kw">let </span>len = ryu::raw::format64(f, buffer.as_mut_ptr() <span class="kw">as </span><span class="kw-2">*mut </span>u8);
<span class="kw">let </span>slice = slice::from_raw_parts(buffer.as_ptr() <span class="kw">as </span><span class="kw-2">*const </span>u8, len);
<span class="kw">let </span>print = str::from_utf8_unchecked(slice);
<span class="macro">assert_eq!</span>(print, <span class="string">"1.234"</span>);
}</code></pre></div>
</div></details></section></div></main></body></html>

2
ryu/raw/index.html Normal file
View file

@ -0,0 +1,2 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Unsafe functions that mirror the API of the C implementation of Ryū."><title>ryu::raw - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="ryu" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../ryu/index.html">ryu</a><span class="version">1.0.18</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module raw</a></h2><h3><a href="#functions">Module Items</a></h3><ul class="block"><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate ryu</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">ryu</a></span><h1>Module <span>raw</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/ryu/lib.rs.html#123">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Unsafe functions that mirror the API of the C implementation of Ryū.</p>
</div></details><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.format32.html" title="fn ryu::raw::format32">format32</a><sup title="unsafe function"></sup></div><div class="desc docblock-short">Print f32 to the given buffer and return number of bytes written.</div></li><li><div class="item-name"><a class="fn" href="fn.format64.html" title="fn ryu::raw::format64">format64</a><sup title="unsafe function"></sup></div><div class="desc docblock-short">Print f64 to the given buffer and return number of bytes written.</div></li></ul></section></div></main></body></html>

1
ryu/raw/sidebar-items.js Normal file
View file

@ -0,0 +1 @@
window.SIDEBAR_ITEMS = {"fn":["format32","format64"]};