Skip to content

Commit

Permalink
deploy: 0f8cef6
Browse files Browse the repository at this point in the history
  • Loading branch information
artichoke-ci committed Feb 11, 2025
0 parents commit 24a3d28
Show file tree
Hide file tree
Showing 67 changed files with 2,997 additions and 0 deletions.
Empty file added .lock
Empty file.
Empty file added .nojekyll
Empty file.
1 change: 1 addition & 0 deletions boba/all.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!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="List of all items in this crate"><title>List of all items in this crate</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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-cf3c48c1.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="boba" data-themes="" data-resource-suffix="" data-rustdoc-version="1.86.0-nightly (124cc9219 2025-02-09)" data-channel="nightly" data-search-js="search-581efc7a.js" data-settings-js="settings-6dad6058.js" ><script src="../static.files/storage-3a5871a4.js"></script><script defer src="../static.files/main-4d63596a.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 sys"><!--[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="../boba/index.html">boba</a><span class="version">6.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h3><a href="#enums">Crate Items</a></h3><ul class="block"><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><h1>List of all items</h1><h3 id="enums">Enums</h3><ul class="all-items"><li><a href="enum.DecodeError.html">DecodeError</a></li></ul><h3 id="functions">Functions</h3><ul class="all-items"><li><a href="fn.decode.html">decode</a></li><li><a href="fn.encode.html">encode</a></li></ul></section></div></main></body></html>
58 changes: 58 additions & 0 deletions boba/enum.DecodeError.html

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions boba/fn.decode.html
Original file line number Diff line number Diff line change
@@ -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="Decode Bubble Babble-encoded byte slice to a `Vec&#60;u8&#62;`."><title>decode in boba - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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-cf3c48c1.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="boba" data-themes="" data-resource-suffix="" data-rustdoc-version="1.86.0-nightly (124cc9219 2025-02-09)" data-channel="nightly" data-search-js="search-581efc7a.js" data-settings-js="settings-6dad6058.js" ><script src="../static.files/storage-3a5871a4.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-4d63596a.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="../boba/index.html">boba</a><span class="version">6.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">decode</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li><li><a href="#errors" title="Errors">Errors</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate boba</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"><div class="rustdoc-breadcrumbs"><a href="index.html">boba</a></div><h1>Function <span class="fn">decode</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/boba/lib.rs.html#197-199">Source</a> </span></div><pre class="rust item-decl"><code>pub fn decode&lt;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;[<a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u8.html">u8</a>]&gt;&gt;(encoded: T) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u8.html">u8</a>&gt;, <a class="enum" href="enum.DecodeError.html" title="enum boba::DecodeError">DecodeError</a>&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Decode Bubble Babble-encoded byte slice to a <a href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec"><code>Vec&lt;u8&gt;</code></a>.</p>
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="macro">assert_eq!</span>(boba::decode(<span class="string">"xexax"</span>)<span class="question-mark">?</span>, <span class="macro">vec!</span>[]);
<span class="macro">assert_eq!</span>(boba::decode(<span class="string">"xesef-disof-gytuf-katof-movif-baxux"</span>)<span class="question-mark">?</span>, <span class="string">b"1234567890"</span>);
<span class="macro">assert_eq!</span>(boba::decode(<span class="string">"xigak-nyryk-humil-bosek-sonax"</span>)<span class="question-mark">?</span>, <span class="string">b"Pineapple"</span>);</code></pre></div>
<h2 id="errors"><a class="doc-anchor" href="#errors">§</a>Errors</h2>
<p>Decoding is fallible and might return <a href="enum.DecodeError.html" title="enum boba::DecodeError"><code>DecodeError</code></a> if:</p>
<ul>
<li>The input is not an ASCII string.</li>
<li>The input contains an ASCII character outside of the Bubble Babble
encoding alphabet.</li>
<li>The input does not start with a leading <code>x</code>.</li>
<li>The input does not end with a trailing <code>x</code>.</li>
<li>The decoded result does not checksum properly.</li>
</ul>

<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="macro">assert_eq!</span>(boba::decode(<span class="string">"x💎🦀x"</span>), <span class="prelude-val">Err</span>(DecodeError::InvalidByte(<span class="number">1</span>)));
<span class="macro">assert_eq!</span>(boba::decode(<span class="string">"x789x"</span>), <span class="prelude-val">Err</span>(DecodeError::InvalidByte(<span class="number">1</span>)));
<span class="macro">assert_eq!</span>(boba::decode(<span class="string">"yx"</span>), <span class="prelude-val">Err</span>(DecodeError::MalformedHeader));
<span class="macro">assert_eq!</span>(boba::decode(<span class="string">"xy"</span>), <span class="prelude-val">Err</span>(DecodeError::MalformedTrailer));
<span class="macro">assert_eq!</span>(boba::decode(<span class="string">""</span>), <span class="prelude-val">Err</span>(DecodeError::Corrupted));
<span class="macro">assert_eq!</span>(boba::decode(<span class="string">"z"</span>), <span class="prelude-val">Err</span>(DecodeError::Corrupted));
<span class="macro">assert_eq!</span>(boba::decode(<span class="string">"xx"</span>), <span class="prelude-val">Err</span>(DecodeError::Corrupted));</code></pre></div>
</div></details></section></div></main></body></html>
6 changes: 6 additions & 0 deletions boba/fn.encode.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!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="Encode a byte slice with the Bubble Babble encoding to a `String`."><title>encode in boba - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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-cf3c48c1.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="boba" data-themes="" data-resource-suffix="" data-rustdoc-version="1.86.0-nightly (124cc9219 2025-02-09)" data-channel="nightly" data-search-js="search-581efc7a.js" data-settings-js="settings-6dad6058.js" ><script src="../static.files/storage-3a5871a4.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-4d63596a.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="../boba/index.html">boba</a><span class="version">6.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">encode</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#examples" title="Examples">Examples</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate boba</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"><div class="rustdoc-breadcrumbs"><a href="index.html">boba</a></div><h1>Function <span class="fn">encode</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/boba/lib.rs.html#157-159">Source</a> </span></div><pre class="rust item-decl"><code>pub fn encode&lt;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;[<a class="primitive" href="https://doc.rust-lang.org/nightly/core/primitive.u8.html">u8</a>]&gt;&gt;(data: T) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Encode a byte slice with the Bubble Babble encoding to a <a href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String"><code>String</code></a>.</p>
<h2 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h2>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="macro">assert_eq!</span>(boba::encode([]), <span class="string">"xexax"</span>);
<span class="macro">assert_eq!</span>(boba::encode(<span class="string">"1234567890"</span>), <span class="string">"xesef-disof-gytuf-katof-movif-baxux"</span>);
<span class="macro">assert_eq!</span>(boba::encode(<span class="string">"Pineapple"</span>), <span class="string">"xigak-nyryk-humil-bosek-sonax"</span>);</code></pre></div>
</div></details></section></div></main></body></html>
27 changes: 27 additions & 0 deletions boba/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!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="This crate provides an implementation of a Bubble Babble encoder and decoder."><title>boba - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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-cf3c48c1.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="boba" data-themes="" data-resource-suffix="" data-rustdoc-version="1.86.0-nightly (124cc9219 2025-02-09)" data-channel="nightly" data-search-js="search-581efc7a.js" data-settings-js="settings-6dad6058.js" ><script src="../static.files/storage-3a5871a4.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-4d63596a.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 crate"><!--[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="../boba/index.html">boba</a><span class="version">6.0.0</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#usage" title="Usage">Usage</a></li><li><a href="#crate-features" title="Crate Features">Crate Features</a></li></ul><h3><a href="#enums">Crate Items</a></h3><ul class="block"><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"></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"><h1>Crate <span>boba</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/boba/lib.rs.html#1-342">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This crate provides an implementation of a Bubble Babble encoder and
decoder.</p>
<p>The Bubble Babble encoding uses alternation of consonants and vowels to
encode binary data to pseudowords that can be pronounced more easily than
arbitrary lists of hexadecimal digits.</p>
<p>Bubble Babble is part of the Digest libraries in <a href="https://metacpan.org/pod/Digest::BubbleBabble">Perl</a>
and <a href="https://ruby-doc.org/stdlib-3.1.1/libdoc/digest/rdoc/Digest.html#method-c-bubblebabble">Ruby</a>.</p>
<h2 id="usage"><a class="doc-anchor" href="#usage">§</a>Usage</h2>
<p>You can encode binary data by calling <a href="fn.encode.html" title="fn boba::encode"><code>encode</code></a>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>encoded = boba::encode(<span class="string">"Pineapple"</span>);
<span class="macro">assert_eq!</span>(encoded, <span class="string">"xigak-nyryk-humil-bosek-sonax"</span>);</code></pre></div>
<p>Decoding binary data is done by calling <a href="fn.decode.html" title="fn boba::decode"><code>decode</code></a>:</p>

<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>decoded = boba::decode(<span class="string">"xexax"</span>)<span class="question-mark">?</span>;
<span class="macro">assert_eq!</span>(decoded, <span class="macro">vec!</span>[]);</code></pre></div>
<p>Decoding data is fallible and can return <a href="enum.DecodeError.html" title="enum boba::DecodeError"><code>DecodeError</code></a>. For example, all
Bubble Babble–encoded data has an ASCII alphabet, so attempting to decode an
emoji will fail.</p>

<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>decoded = boba::decode(<span class="string">"x🦀x"</span>);
<span class="comment">// The `DecodeError` contains the offset of the first invalid byte.
</span><span class="macro">assert_eq!</span>(decoded, <span class="prelude-val">Err</span>(DecodeError::InvalidByte(<span class="number">1</span>)));</code></pre></div>
<h2 id="crate-features"><a class="doc-anchor" href="#crate-features">§</a>Crate Features</h2>
<p>Boba is <code>no_std</code> compatible with a required dependency on the <a href="https://doc.rust-lang.org/nightly/alloc/index.html" title="mod alloc"><code>alloc</code></a>
crate.</p>
</div></details><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.DecodeError.html" title="enum boba::DecodeError">Decode<wbr>Error</a></dt><dd>Decoding errors from <a href="fn.decode.html" title="fn boba::decode"><code>boba::decode</code></a>.</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.decode.html" title="fn boba::decode">decode</a></dt><dd>Decode Bubble Babble-encoded byte slice to a <a href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec"><code>Vec&lt;u8&gt;</code></a>.</dd><dt><a class="fn" href="fn.encode.html" title="fn boba::encode">encode</a></dt><dd>Encode a byte slice with the Bubble Babble encoding to a <a href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String"><code>String</code></a>.</dd></dl></section></div></main></body></html>
Loading

0 comments on commit 24a3d28

Please sign in to comment.