Initial docs commit
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<!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="Classification of text as Latin1 (all code points are below U+0100), left-to-right with some non-Latin1 characters or as containing at least some right-to-left characters."><meta name="keywords" content="rust, rustlang, rust-lang, Latin1Bidi"><title>encoding_rs::mem::Latin1Bidi - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Enum Latin1Bidi</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Bidi">Bidi</a><a href="#variant.Latin1">Latin1</a><a href="#variant.LeftToRight">LeftToRight</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Eq">Eq</a><a href="#impl-PartialEq%3CLatin1Bidi%3E">PartialEq<Latin1Bidi></a><a href="#impl-StructuralEq">StructuralEq</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="Latin1Bidi" data-ty="enum" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Enum <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="enum" href="">Latin1Bidi</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#68-76" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust enum"><span class="docblock attributes top-attr">#[must_use]
|
||||
#[repr(C)]</span>pub enum Latin1Bidi {
|
||||
Latin1,
|
||||
LeftToRight,
|
||||
Bidi,
|
||||
}</pre></div><div class="docblock"><p>Classification of text as Latin1 (all code points are below U+0100),
|
||||
left-to-right with some non-Latin1 characters or as containing at least
|
||||
some right-to-left characters.</p>
|
||||
</div><h2 id="variants" class="variants small-section-header">
|
||||
Variants<a href="#variants" class="anchor"></a></h2>
|
||||
<div id="variant.Latin1" class="variant small-section-header"><a href="#variant.Latin1" class="anchor field"></a><code>Latin1</code></div><div class="docblock"><p>Every character is below U+0100.</p>
|
||||
</div><div id="variant.LeftToRight" class="variant small-section-header"><a href="#variant.LeftToRight" class="anchor field"></a><code>LeftToRight</code></div><div class="docblock"><p>There is at least one character that’s U+0100 or higher, but there
|
||||
are no right-to-left characters.</p>
|
||||
</div><div id="variant.Bidi" class="variant small-section-header"><a href="#variant.Bidi" class="anchor field"></a><code>Bidi</code></div><div class="docblock"><p>There is at least one right-to-left character.</p>
|
||||
</div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../../encoding_rs/mem/enum.Latin1Bidi.html" title="enum encoding_rs::mem::Latin1Bidi">Latin1Bidi</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/encoding_rs/mem.rs.html#66" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/encoding_rs/mem.rs.html#66" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||||
</div></div><h3 id="impl-Eq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="enum" href="../../encoding_rs/mem/enum.Latin1Bidi.html" title="enum encoding_rs::mem::Latin1Bidi">Latin1Bidi</a></code><a href="#impl-Eq" class="anchor"></a><a class="srclink" href="../../src/encoding_rs/mem.rs.html#66" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-PartialEq%3CLatin1Bidi%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a><<a class="enum" href="../../encoding_rs/mem/enum.Latin1Bidi.html" title="enum encoding_rs::mem::Latin1Bidi">Latin1Bidi</a>> for <a class="enum" href="../../encoding_rs/mem/enum.Latin1Bidi.html" title="enum encoding_rs::mem::Latin1Bidi">Latin1Bidi</a></code><a href="#impl-PartialEq%3CLatin1Bidi%3E" class="anchor"></a><a class="srclink" href="../../src/encoding_rs/mem.rs.html#66" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&self, other: &<a class="enum" href="../../encoding_rs/mem/enum.Latin1Bidi.html" title="enum encoding_rs::mem::Latin1Bidi">Latin1Bidi</a>) -> bool</code><a class="srclink" href="../../src/encoding_rs/mem.rs.html#66" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
|
||||
by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
||||
</div><h4 id="method.ne" class="method hidden"><code><span class="docblock attributes">#[must_use]</span>pub fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&self, other: &Rhs) -> bool</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
|
||||
</div></div><h3 id="impl-StructuralEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralEq.html" title="trait core::marker::StructuralEq">StructuralEq</a> for <a class="enum" href="../../encoding_rs/mem/enum.Latin1Bidi.html" title="enum encoding_rs::mem::Latin1Bidi">Latin1Bidi</a></code><a href="#impl-StructuralEq" class="anchor"></a><a class="srclink" href="../../src/encoding_rs/mem.rs.html#66" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-StructuralPartialEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="../../encoding_rs/mem/enum.Latin1Bidi.html" title="enum encoding_rs::mem::Latin1Bidi">Latin1Bidi</a></code><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../../src/encoding_rs/mem.rs.html#66" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../../encoding_rs/mem/enum.Latin1Bidi.html" title="enum encoding_rs::mem::Latin1Bidi">Latin1Bidi</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../../encoding_rs/mem/enum.Latin1Bidi.html" title="enum encoding_rs::mem::Latin1Bidi">Latin1Bidi</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../../encoding_rs/mem/enum.Latin1Bidi.html" title="enum encoding_rs::mem::Latin1Bidi">Latin1Bidi</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#207-211" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> &T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214-218" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> &mut T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#215" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
</div></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#545-549" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#546" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-Into%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href="#impl-Into%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#534-541" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -> U</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#538" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-TryFrom%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#582-591" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id="method.try_from" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#588" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div><h3 id="impl-TryInto%3CU%3E" class="impl"><code class="in-band">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href="#impl-TryInto%3CU%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#568-577" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Error-1" class="type"><code>type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||||
</div><h4 id="method.try_into" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#574" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||||
</div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,11 @@
|
||||
<!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="Checks whether a valid UTF-8 buffer contains code points that trigger right-to-left processing or is all-Latin1."><meta name="keywords" content="rust, rustlang, rust-lang, check_str_for_latin1_and_bidi"><title>encoding_rs::mem::check_str_for_latin1_and_bidi - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="check_str_for_latin1_and_bidi" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">check_str_for_latin1_and_bidi</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#1438-1450" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn check_str_for_latin1_and_bidi(buffer: &str) -> <a class="enum" href="../../encoding_rs/mem/enum.Latin1Bidi.html" title="enum encoding_rs::mem::Latin1Bidi">Latin1Bidi</a></pre><div class="docblock"><p>Checks whether a valid UTF-8 buffer contains code points
|
||||
that trigger right-to-left processing or is all-Latin1.</p>
|
||||
<p>Possibly more efficient than performing the checks separately.</p>
|
||||
<p>Returns <code>Latin1Bidi::Latin1</code> if <code>is_str_latin1()</code> would return <code>true</code>.
|
||||
Otherwise, returns <code>Latin1Bidi::Bidi</code> if <code>is_str_bidi()</code> would return
|
||||
<code>true</code>. Otherwise, returns <code>Latin1Bidi::LeftToRight</code>.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,11 @@
|
||||
<!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="Checks whether a potentially invalid UTF-16 buffer contains code points that trigger right-to-left processing or is all-Latin1."><meta name="keywords" content="rust, rustlang, rust-lang, check_utf16_for_latin1_and_bidi"><title>encoding_rs::mem::check_utf16_for_latin1_and_bidi - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="check_utf16_for_latin1_and_bidi" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">check_utf16_for_latin1_and_bidi</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#1460-1462" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn check_utf16_for_latin1_and_bidi(buffer: &[u16]) -> <a class="enum" href="../../encoding_rs/mem/enum.Latin1Bidi.html" title="enum encoding_rs::mem::Latin1Bidi">Latin1Bidi</a></pre><div class="docblock"><p>Checks whether a potentially invalid UTF-16 buffer contains code points
|
||||
that trigger right-to-left processing or is all-Latin1.</p>
|
||||
<p>Possibly more efficient than performing the checks separately.</p>
|
||||
<p>Returns <code>Latin1Bidi::Latin1</code> if <code>is_utf16_latin1()</code> would return <code>true</code>.
|
||||
Otherwise, returns <code>Latin1Bidi::Bidi</code> if <code>is_utf16_bidi()</code> would return
|
||||
<code>true</code>. Otherwise, returns <code>Latin1Bidi::LeftToRight</code>.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,11 @@
|
||||
<!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="Checks whether a potentially invalid UTF-8 buffer contains code points that trigger right-to-left processing or is all-Latin1."><meta name="keywords" content="rust, rustlang, rust-lang, check_utf8_for_latin1_and_bidi"><title>encoding_rs::mem::check_utf8_for_latin1_and_bidi - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="check_utf8_for_latin1_and_bidi" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">check_utf8_for_latin1_and_bidi</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#1418-1428" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn check_utf8_for_latin1_and_bidi(buffer: &[u8]) -> <a class="enum" href="../../encoding_rs/mem/enum.Latin1Bidi.html" title="enum encoding_rs::mem::Latin1Bidi">Latin1Bidi</a></pre><div class="docblock"><p>Checks whether a potentially invalid UTF-8 buffer contains code points
|
||||
that trigger right-to-left processing or is all-Latin1.</p>
|
||||
<p>Possibly more efficient than performing the checks separately.</p>
|
||||
<p>Returns <code>Latin1Bidi::Latin1</code> if <code>is_utf8_latin1()</code> would return <code>true</code>.
|
||||
Otherwise, returns <code>Latin1Bidi::Bidi</code> if <code>is_utf8_bidi()</code> would return
|
||||
<code>true</code>. Otherwise, returns <code>Latin1Bidi::LeftToRight</code>.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,13 @@
|
||||
<!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="Converts bytes whose unsigned value is interpreted as Unicode code point (i.e. U+0000 to U+00FF, inclusive) to UTF-8 such that the validity of the output is signaled using the Rust type system."><meta name="keywords" content="rust, rustlang, rust-lang, convert_latin1_to_str"><title>encoding_rs::mem::convert_latin1_to_str - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="convert_latin1_to_str" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">convert_latin1_to_str</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#1880-1888" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn convert_latin1_to_str(src: &[u8], dst: &mut str) -> usize</pre><div class="docblock"><p>Converts bytes whose unsigned value is interpreted as Unicode code point
|
||||
(i.e. U+0000 to U+00FF, inclusive) to UTF-8 such that the validity of the
|
||||
output is signaled using the Rust type system.</p>
|
||||
<p>The length of the destination buffer must be at least the length of the
|
||||
source buffer times two.</p>
|
||||
<p>Returns the number of bytes written.</p>
|
||||
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
|
||||
<p>Panics if the destination buffer is shorter than stated above.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,11 @@
|
||||
<!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="Converts bytes whose unsigned value is interpreted as Unicode code point (i.e. U+0000 to U+00FF, inclusive) to UTF-8 such that the validity of the output is signaled using the Rust type system with potentially insufficient output space."><meta name="keywords" content="rust, rustlang, rust-lang, convert_latin1_to_str_partial"><title>encoding_rs::mem::convert_latin1_to_str_partial - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="convert_latin1_to_str_partial" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">convert_latin1_to_str_partial</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#1850-1865" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn convert_latin1_to_str_partial(<br> src: &[u8], <br> dst: &mut str<br>) -> (usize, usize)</pre><div class="docblock"><p>Converts bytes whose unsigned value is interpreted as Unicode code point
|
||||
(i.e. U+0000 to U+00FF, inclusive) to UTF-8 such that the validity of the
|
||||
output is signaled using the Rust type system with potentially insufficient
|
||||
output space.</p>
|
||||
<p>Returns the number of bytes read and the number of bytes written.</p>
|
||||
<p>If the output isn’t large enough, not all input is consumed.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,12 @@
|
||||
<!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="Converts bytes whose unsigned value is interpreted as Unicode code point (i.e. U+0000 to U+00FF, inclusive) to UTF-16."><meta name="keywords" content="rust, rustlang, rust-lang, convert_latin1_to_utf16"><title>encoding_rs::mem::convert_latin1_to_utf16 - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="convert_latin1_to_utf16" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">convert_latin1_to_utf16</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#1749-1760" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn convert_latin1_to_utf16(src: &[u8], dst: &mut [u16])</pre><div class="docblock"><p>Converts bytes whose unsigned value is interpreted as Unicode code point
|
||||
(i.e. U+0000 to U+00FF, inclusive) to UTF-16.</p>
|
||||
<p>The length of the destination buffer must be at least the length of the
|
||||
source buffer.</p>
|
||||
<p>The number of <code>u16</code>s written equals the length of the source buffer.</p>
|
||||
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
|
||||
<p>Panics if the destination buffer is shorter than stated above.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,17 @@
|
||||
<!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="Converts bytes whose unsigned value is interpreted as Unicode code point (i.e. U+0000 to U+00FF, inclusive) to UTF-8."><meta name="keywords" content="rust, rustlang, rust-lang, convert_latin1_to_utf8"><title>encoding_rs::mem::convert_latin1_to_utf8 - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="convert_latin1_to_utf8" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">convert_latin1_to_utf8</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#1831-1839" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn convert_latin1_to_utf8(src: &[u8], dst: &mut [u8]) -> usize</pre><div class="docblock"><p>Converts bytes whose unsigned value is interpreted as Unicode code point
|
||||
(i.e. U+0000 to U+00FF, inclusive) to UTF-8.</p>
|
||||
<p>The length of the destination buffer must be at least the length of the
|
||||
source buffer times two.</p>
|
||||
<p>Returns the number of bytes written.</p>
|
||||
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
|
||||
<p>Panics if the destination buffer is shorter than stated above.</p>
|
||||
<h1 id="safety" class="section-header"><a href="#safety">Safety</a></h1>
|
||||
<p>Note that this function may write garbage beyond the number of bytes
|
||||
indicated by the return value, so using a <code>&mut str</code> interpreted as
|
||||
<code>&mut [u8]</code> as the destination is not safe. If you want to convert into
|
||||
a <code>&mut str</code>, use <code>convert_utf16_to_str()</code> instead of this function.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,14 @@
|
||||
<!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="Converts bytes whose unsigned value is interpreted as Unicode code point (i.e. U+0000 to U+00FF, inclusive) to UTF-8 with potentially insufficient output space."><meta name="keywords" content="rust, rustlang, rust-lang, convert_latin1_to_utf8_partial"><title>encoding_rs::mem::convert_latin1_to_utf8_partial - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="convert_latin1_to_utf8_partial" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">convert_latin1_to_utf8_partial</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#1775-1810" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn convert_latin1_to_utf8_partial(<br> src: &[u8], <br> dst: &mut [u8]<br>) -> (usize, usize)</pre><div class="docblock"><p>Converts bytes whose unsigned value is interpreted as Unicode code point
|
||||
(i.e. U+0000 to U+00FF, inclusive) to UTF-8 with potentially insufficient
|
||||
output space.</p>
|
||||
<p>Returns the number of bytes read and the number of bytes written.</p>
|
||||
<p>If the output isn’t large enough, not all input is consumed.</p>
|
||||
<h1 id="safety" class="section-header"><a href="#safety">Safety</a></h1>
|
||||
<p>If you want to convert into a <code>&mut str</code>, use
|
||||
<code>convert_utf16_to_str_partial()</code> instead of using this function
|
||||
together with the <code>unsafe</code> method <code>as_bytes_mut()</code> on <code>&mut str</code>.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,11 @@
|
||||
<!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="Converts valid UTF-8 to valid UTF-16."><meta name="keywords" content="rust, rustlang, rust-lang, convert_str_to_utf16"><title>encoding_rs::mem::convert_str_to_utf16 - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="convert_str_to_utf16" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">convert_str_to_utf16</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#1514-1599" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn convert_str_to_utf16(src: &str, dst: &mut [u16]) -> usize</pre><div class="docblock"><p>Converts valid UTF-8 to valid UTF-16.</p>
|
||||
<p>The length of the destination buffer must be at least the length of the
|
||||
source buffer.</p>
|
||||
<p>Returns the number of <code>u16</code>s written.</p>
|
||||
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
|
||||
<p>Panics if the destination buffer is shorter than stated above.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,22 @@
|
||||
<!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="If the input is valid UTF-16 representing only Unicode code points from U+0000 to U+00FF, inclusive, converts the input into output that represents the value of each code point as the unsigned byte value of each output byte."><meta name="keywords" content="rust, rustlang, rust-lang, convert_utf16_to_latin1_lossy"><title>encoding_rs::mem::convert_utf16_to_latin1_lossy - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="convert_utf16_to_latin1_lossy" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">convert_utf16_to_latin1_lossy</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#1975-1984" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn convert_utf16_to_latin1_lossy(src: &[u16], dst: &mut [u8])</pre><div class="docblock"><p>If the input is valid UTF-16 representing only Unicode code points from
|
||||
U+0000 to U+00FF, inclusive, converts the input into output that
|
||||
represents the value of each code point as the unsigned byte value of
|
||||
each output byte.</p>
|
||||
<p>If the input does not fulfill the condition stated above, does something
|
||||
that is memory-safe without any promises about any properties of the
|
||||
output and will probably assert in debug builds in future versions.
|
||||
In particular, callers shouldn’t assume the output to be the same across
|
||||
crate versions or CPU architectures and should not assume that non-ASCII
|
||||
input can’t map to ASCII output.</p>
|
||||
<p>The length of the destination buffer must be at least the length of the
|
||||
source buffer.</p>
|
||||
<p>The number of bytes written equals the length of the source buffer.</p>
|
||||
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
|
||||
<p>Panics if the destination buffer is shorter than stated above.</p>
|
||||
<p>(Probably in future versions if debug assertions are enabled (and not
|
||||
fuzzing) and the input is not in the range U+0000 to U+00FF, inclusive.)</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,13 @@
|
||||
<!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="Converts potentially-invalid UTF-16 to valid UTF-8 with errors replaced with the REPLACEMENT CHARACTER such that the validity of the output is signaled using the Rust type system."><meta name="keywords" content="rust, rustlang, rust-lang, convert_utf16_to_str"><title>encoding_rs::mem::convert_utf16_to_str - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="convert_utf16_to_str" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">convert_utf16_to_str</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#1731-1736" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn convert_utf16_to_str(src: &[u16], dst: &mut str) -> usize</pre><div class="docblock"><p>Converts potentially-invalid UTF-16 to valid UTF-8 with errors replaced
|
||||
with the REPLACEMENT CHARACTER such that the validity of the output is
|
||||
signaled using the Rust type system.</p>
|
||||
<p>The length of the destination buffer must be at least the length of the
|
||||
source buffer times three.</p>
|
||||
<p>Returns the number of bytes written.</p>
|
||||
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
|
||||
<p>Panics if the destination buffer is shorter than stated above.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,15 @@
|
||||
<!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="Converts potentially-invalid UTF-16 to valid UTF-8 with errors replaced with the REPLACEMENT CHARACTER such that the validity of the output is signaled using the Rust type system with potentially insufficient output space."><meta name="keywords" content="rust, rustlang, rust-lang, convert_utf16_to_str_partial"><title>encoding_rs::mem::convert_utf16_to_str_partial - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="convert_utf16_to_str_partial" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">convert_utf16_to_str_partial</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#1706-1716" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn convert_utf16_to_str_partial(<br> src: &[u16], <br> dst: &mut str<br>) -> (usize, usize)</pre><div class="docblock"><p>Converts potentially-invalid UTF-16 to valid UTF-8 with errors replaced
|
||||
with the REPLACEMENT CHARACTER such that the validity of the output is
|
||||
signaled using the Rust type system with potentially insufficient output
|
||||
space.</p>
|
||||
<p>Returns the number of code units read and the number of bytes written.</p>
|
||||
<p>Not all code units are read if there isn’t enough output space.</p>
|
||||
<p>Note that this method isn’t designed for general streamability but for
|
||||
not allocating memory for the worst case up front. Specifically,
|
||||
if the input starts with or ends with an unpaired surrogate, those are
|
||||
replaced with the REPLACEMENT CHARACTER.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,16 @@
|
||||
<!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="Converts potentially-invalid UTF-16 to valid UTF-8 with errors replaced with the REPLACEMENT CHARACTER."><meta name="keywords" content="rust, rustlang, rust-lang, convert_utf16_to_utf8"><title>encoding_rs::mem::convert_utf16_to_utf8 - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="convert_utf16_to_utf8" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">convert_utf16_to_utf8</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#1686-1691" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn convert_utf16_to_utf8(src: &[u16], dst: &mut [u8]) -> usize</pre><div class="docblock"><p>Converts potentially-invalid UTF-16 to valid UTF-8 with errors replaced
|
||||
with the REPLACEMENT CHARACTER.</p>
|
||||
<p>The length of the destination buffer must be at least the length of the
|
||||
source buffer times three.</p>
|
||||
<p>Returns the number of bytes written.</p>
|
||||
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
|
||||
<p>Panics if the destination buffer is shorter than stated above.</p>
|
||||
<h1 id="safety" class="section-header"><a href="#safety">Safety</a></h1>
|
||||
<p>If you want to convert into a <code>&mut str</code>, use <code>convert_utf16_to_str()</code>
|
||||
instead of using this function together with the <code>unsafe</code> method
|
||||
<code>as_bytes_mut()</code> on <code>&mut str</code>.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,23 @@
|
||||
<!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="Converts potentially-invalid UTF-16 to valid UTF-8 with errors replaced with the REPLACEMENT CHARACTER with potentially insufficient output space."><meta name="keywords" content="rust, rustlang, rust-lang, convert_utf16_to_utf8_partial"><title>encoding_rs::mem::convert_utf16_to_utf8_partial - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="convert_utf16_to_utf8_partial" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">convert_utf16_to_utf8_partial</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#1651-1666" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn convert_utf16_to_utf8_partial(<br> src: &[u16], <br> dst: &mut [u8]<br>) -> (usize, usize)</pre><div class="docblock"><p>Converts potentially-invalid UTF-16 to valid UTF-8 with errors replaced
|
||||
with the REPLACEMENT CHARACTER with potentially insufficient output
|
||||
space.</p>
|
||||
<p>Returns the number of code units read and the number of bytes written.</p>
|
||||
<p>Guarantees that the bytes in the destination beyond the number of
|
||||
bytes claimed as written by the second item of the return tuple
|
||||
are left unmodified.</p>
|
||||
<p>Not all code units are read if there isn’t enough output space.</p>
|
||||
<p>Note that this method isn’t designed for general streamability but for
|
||||
not allocating memory for the worst case up front. Specifically,
|
||||
if the input starts with or ends with an unpaired surrogate, those are
|
||||
replaced with the REPLACEMENT CHARACTER.</p>
|
||||
<p>Matches the semantics of <code>TextEncoder.encodeInto()</code> from the
|
||||
Encoding Standard.</p>
|
||||
<h1 id="safety" class="section-header"><a href="#safety">Safety</a></h1>
|
||||
<p>If you want to convert into a <code>&mut str</code>, use
|
||||
<code>convert_utf16_to_str_partial()</code> instead of using this function
|
||||
together with the <code>unsafe</code> method <code>as_bytes_mut()</code> on <code>&mut str</code>.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,22 @@
|
||||
<!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="If the input is valid UTF-8 representing only Unicode code points from U+0000 to U+00FF, inclusive, converts the input into output that represents the value of each code point as the unsigned byte value of each output byte."><meta name="keywords" content="rust, rustlang, rust-lang, convert_utf8_to_latin1_lossy"><title>encoding_rs::mem::convert_utf8_to_latin1_lossy - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="convert_utf8_to_latin1_lossy" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">convert_utf8_to_latin1_lossy</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#1913-1950" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn convert_utf8_to_latin1_lossy(src: &[u8], dst: &mut [u8]) -> usize</pre><div class="docblock"><p>If the input is valid UTF-8 representing only Unicode code points from
|
||||
U+0000 to U+00FF, inclusive, converts the input into output that
|
||||
represents the value of each code point as the unsigned byte value of
|
||||
each output byte.</p>
|
||||
<p>If the input does not fulfill the condition stated above, this function
|
||||
panics if debug assertions are enabled (and fuzzing isn’t) and otherwise
|
||||
does something that is memory-safe without any promises about any
|
||||
properties of the output. In particular, callers shouldn’t assume the
|
||||
output to be the same across crate versions or CPU architectures and
|
||||
should not assume that non-ASCII input can’t map to ASCII output.</p>
|
||||
<p>The length of the destination buffer must be at least the length of the
|
||||
source buffer.</p>
|
||||
<p>Returns the number of bytes written.</p>
|
||||
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
|
||||
<p>Panics if the destination buffer is shorter than stated above.</p>
|
||||
<p>If debug assertions are enabled (and not fuzzing) and the input is
|
||||
not in the range U+0000 to U+00FF, inclusive.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,12 @@
|
||||
<!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="Converts potentially-invalid UTF-8 to valid UTF-16 with errors replaced with the REPLACEMENT CHARACTER."><meta name="keywords" content="rust, rustlang, rust-lang, convert_utf8_to_utf16"><title>encoding_rs::mem::convert_utf8_to_utf16 - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="convert_utf8_to_utf16" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">convert_utf8_to_utf16</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#1475-1502" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn convert_utf8_to_utf16(src: &[u8], dst: &mut [u16]) -> usize</pre><div class="docblock"><p>Converts potentially-invalid UTF-8 to valid UTF-16 with errors replaced
|
||||
with the REPLACEMENT CHARACTER.</p>
|
||||
<p>The length of the destination buffer must be at least the length of the
|
||||
source buffer <em>plus one</em>.</p>
|
||||
<p>Returns the number of <code>u16</code>s written.</p>
|
||||
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
|
||||
<p>Panics if the destination buffer is shorter than stated above.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,12 @@
|
||||
<!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="Converts potentially-invalid UTF-8 to valid UTF-16 signaling on error."><meta name="keywords" content="rust, rustlang, rust-lang, convert_utf8_to_utf16_without_replacement"><title>encoding_rs::mem::convert_utf8_to_utf16_without_replacement - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="convert_utf8_to_utf16_without_replacement" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">convert_utf8_to_utf16_without_replacement</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#1613-1623" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn convert_utf8_to_utf16_without_replacement(<br> src: &[u8], <br> dst: &mut [u16]<br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><usize></pre><div class="docblock"><p>Converts potentially-invalid UTF-8 to valid UTF-16 signaling on error.</p>
|
||||
<p>The length of the destination buffer must be at least the length of the
|
||||
source buffer.</p>
|
||||
<p>Returns the number of <code>u16</code>s written or <code>None</code> if the input was invalid.</p>
|
||||
<p>When the input was invalid, some output may have been written.</p>
|
||||
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
|
||||
<p>Panics if the destination buffer is shorter than stated above.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,12 @@
|
||||
<!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="Copies ASCII from source to destination up to the first non-ASCII byte (or the end of the input if it is ASCII in its entirety)."><meta name="keywords" content="rust, rustlang, rust-lang, copy_ascii_to_ascii"><title>encoding_rs::mem::copy_ascii_to_ascii - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="copy_ascii_to_ascii" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">copy_ascii_to_ascii</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#2089-2101" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn copy_ascii_to_ascii(src: &[u8], dst: &mut [u8]) -> usize</pre><div class="docblock"><p>Copies ASCII from source to destination up to the first non-ASCII byte
|
||||
(or the end of the input if it is ASCII in its entirety).</p>
|
||||
<p>The length of the destination buffer must be at least the length of the
|
||||
source buffer.</p>
|
||||
<p>Returns the number of bytes written.</p>
|
||||
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
|
||||
<p>Panics if the destination buffer is shorter than stated above.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,13 @@
|
||||
<!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="Copies ASCII from source to destination zero-extending it to UTF-16 up to the first non-ASCII byte (or the end of the input if it is ASCII in its entirety)."><meta name="keywords" content="rust, rustlang, rust-lang, copy_ascii_to_basic_latin"><title>encoding_rs::mem::copy_ascii_to_basic_latin - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="copy_ascii_to_basic_latin" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">copy_ascii_to_basic_latin</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#2115-2127" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn copy_ascii_to_basic_latin(src: &[u8], dst: &mut [u16]) -> usize</pre><div class="docblock"><p>Copies ASCII from source to destination zero-extending it to UTF-16 up to
|
||||
the first non-ASCII byte (or the end of the input if it is ASCII in its
|
||||
entirety).</p>
|
||||
<p>The length of the destination buffer must be at least the length of the
|
||||
source buffer.</p>
|
||||
<p>Returns the number of <code>u16</code>s written.</p>
|
||||
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
|
||||
<p>Panics if the destination buffer is shorter than stated above.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,13 @@
|
||||
<!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="Copies Basic Latin from source to destination narrowing it to ASCII up to the first non-Basic Latin code unit (or the end of the input if it is Basic Latin in its entirety)."><meta name="keywords" content="rust, rustlang, rust-lang, copy_basic_latin_to_ascii"><title>encoding_rs::mem::copy_basic_latin_to_ascii - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="copy_basic_latin_to_ascii" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">copy_basic_latin_to_ascii</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#2141-2153" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn copy_basic_latin_to_ascii(src: &[u16], dst: &mut [u8]) -> usize</pre><div class="docblock"><p>Copies Basic Latin from source to destination narrowing it to ASCII up to
|
||||
the first non-Basic Latin code unit (or the end of the input if it is
|
||||
Basic Latin in its entirety).</p>
|
||||
<p>The length of the destination buffer must be at least the length of the
|
||||
source buffer.</p>
|
||||
<p>Returns the number of bytes written.</p>
|
||||
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
|
||||
<p>Panics if the destination buffer is shorter than stated above.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,9 @@
|
||||
<!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="Converts bytes whose unsigned value is interpreted as Unicode code point (i.e. U+0000 to U+00FF, inclusive) to UTF-8."><meta name="keywords" content="rust, rustlang, rust-lang, decode_latin1"><title>encoding_rs::mem::decode_latin1 - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="decode_latin1" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">decode_latin1</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#1991-2009" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn decode_latin1<'a>(bytes: &'a [u8]) -> <a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'a, str></pre><div class="docblock"><p>Converts bytes whose unsigned value is interpreted as Unicode code point
|
||||
(i.e. U+0000 to U+00FF, inclusive) to UTF-8.</p>
|
||||
<p>Borrows if input is ASCII-only. Performs a single heap allocation
|
||||
otherwise.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,17 @@
|
||||
<!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="If the input is valid UTF-8 representing only Unicode code points from U+0000 to U+00FF, inclusive, converts the input into output that represents the value of each code point as the unsigned byte value of each output byte."><meta name="keywords" content="rust, rustlang, rust-lang, encode_latin1_lossy"><title>encoding_rs::mem::encode_latin1_lossy - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="encode_latin1_lossy" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">encode_latin1_lossy</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#2025-2043" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn encode_latin1_lossy<'a>(string: &'a str) -> <a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a><'a, [u8]></pre><div class="docblock"><p>If the input is valid UTF-8 representing only Unicode code points from
|
||||
U+0000 to U+00FF, inclusive, converts the input into output that
|
||||
represents the value of each code point as the unsigned byte value of
|
||||
each output byte.</p>
|
||||
<p>If the input does not fulfill the condition stated above, this function
|
||||
panics if debug assertions are enabled (and fuzzing isn’t) and otherwise
|
||||
does something that is memory-safe without any promises about any
|
||||
properties of the output. In particular, callers shouldn’t assume the
|
||||
output to be the same across crate versions or CPU architectures and
|
||||
should not assume that non-ASCII input can’t map to ASCII output.</p>
|
||||
<p>Borrows if input is ASCII-only. Performs a single heap allocation
|
||||
otherwise.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -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="Replaces unpaired surrogates in the input with the REPLACEMENT CHARACTER."><meta name="keywords" content="rust, rustlang, rust-lang, ensure_utf16_validity"><title>encoding_rs::mem::ensure_utf16_validity - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="ensure_utf16_validity" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">ensure_utf16_validity</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#2066-2076" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn ensure_utf16_validity(buffer: &mut [u16])</pre><div class="docblock"><p>Replaces unpaired surrogates in the input with the REPLACEMENT CHARACTER.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,8 @@
|
||||
<!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="Checks whether the buffer is all-ASCII."><meta name="keywords" content="rust, rustlang, rust-lang, is_ascii"><title>encoding_rs::mem::is_ascii - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="is_ascii" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">is_ascii</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#639-641" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn is_ascii(buffer: &[u8]) -> bool</pre><div class="docblock"><p>Checks whether the buffer is all-ASCII.</p>
|
||||
<p>May read the entire buffer even if it isn’t all-ASCII. (I.e. the function
|
||||
is not guaranteed to fail fast.)</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,9 @@
|
||||
<!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="Checks whether the buffer is all-Basic Latin (i.e. UTF-16 representing only ASCII characters)."><meta name="keywords" content="rust, rustlang, rust-lang, is_basic_latin"><title>encoding_rs::mem::is_basic_latin - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="is_basic_latin" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">is_basic_latin</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#648-650" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn is_basic_latin(buffer: &[u16]) -> bool</pre><div class="docblock"><p>Checks whether the buffer is all-Basic Latin (i.e. UTF-16 representing
|
||||
only ASCII characters).</p>
|
||||
<p>May read the entire buffer even if it isn’t all-ASCII. (I.e. the function
|
||||
is not guaranteed to fail fast.)</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,15 @@
|
||||
<!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="Checks whether a scalar value triggers right-to-left processing."><meta name="keywords" content="rust, rustlang, rust-lang, is_char_bidi"><title>encoding_rs::mem::is_char_bidi - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="is_char_bidi" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">is_char_bidi</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#1302-1356" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn is_char_bidi(c: char) -> bool</pre><div class="docblock"><p>Checks whether a scalar value triggers right-to-left processing.</p>
|
||||
<p>The check is done on a Unicode block basis without regard to assigned
|
||||
vs. unassigned code points in the block. Hebrew presentation forms in
|
||||
the Alphabetic Presentation Forms block are treated as if they formed
|
||||
a block on their own (i.e. it treated as right-to-left). Additionally,
|
||||
the four RIGHT-TO-LEFT FOO controls in General Punctuation are checked
|
||||
for. Control characters that are technically bidi controls but do not
|
||||
cause right-to-left behavior without the presence of right-to-left
|
||||
characters or right-to-left controls are not checked for. As a special
|
||||
case, U+FEFF is excluded from Arabic Presentation Forms-B.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,16 @@
|
||||
<!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="Checks whether a valid UTF-8 buffer contains code points that trigger right-to-left processing."><meta name="keywords" content="rust, rustlang, rust-lang, is_str_bidi"><title>encoding_rs::mem::is_str_bidi - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="is_str_bidi" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">is_str_bidi</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#1127-1267" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn is_str_bidi(buffer: &str) -> bool</pre><div class="docblock"><p>Checks whether a valid UTF-8 buffer contains code points that trigger
|
||||
right-to-left processing.</p>
|
||||
<p>The check is done on a Unicode block basis without regard to assigned
|
||||
vs. unassigned code points in the block. Hebrew presentation forms in
|
||||
the Alphabetic Presentation Forms block are treated as if they formed
|
||||
a block on their own (i.e. it treated as right-to-left). Additionally,
|
||||
the four RIGHT-TO-LEFT FOO controls in General Punctuation are checked
|
||||
for. Control characters that are technically bidi controls but do not
|
||||
cause right-to-left behavior without the presence of right-to-left
|
||||
characters or right-to-left controls are not checked for. As a special
|
||||
case, U+FEFF is excluded from Arabic Presentation Forms-B.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,9 @@
|
||||
<!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="Checks whether the buffer represents only code points less than or equal to U+00FF."><meta name="keywords" content="rust, rustlang, rust-lang, is_str_latin1"><title>encoding_rs::mem::is_str_latin1 - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="is_str_latin1" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">is_str_latin1</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#666-668" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn is_str_latin1(buffer: &str) -> bool</pre><div class="docblock"><p>Checks whether the buffer represents only code points less than or equal
|
||||
to U+00FF.</p>
|
||||
<p>Fails fast. (I.e. returns before having read the whole buffer if code
|
||||
points above U+00FF are discovered.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,20 @@
|
||||
<!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="Checks whether a UTF-16 buffer contains code points that trigger right-to-left processing."><meta name="keywords" content="rust, rustlang, rust-lang, is_utf16_bidi"><title>encoding_rs::mem::is_utf16_bidi - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="is_utf16_bidi" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">is_utf16_bidi</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#1286-1288" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn is_utf16_bidi(buffer: &[u16]) -> bool</pre><div class="docblock"><p>Checks whether a UTF-16 buffer contains code points that trigger
|
||||
right-to-left processing.</p>
|
||||
<p>The check is done on a Unicode block basis without regard to assigned
|
||||
vs. unassigned code points in the block. Hebrew presentation forms in
|
||||
the Alphabetic Presentation Forms block are treated as if they formed
|
||||
a block on their own (i.e. it treated as right-to-left). Additionally,
|
||||
the four RIGHT-TO-LEFT FOO controls in General Punctuation are checked
|
||||
for. Control characters that are technically bidi controls but do not
|
||||
cause right-to-left behavior without the presence of right-to-left
|
||||
characters or right-to-left controls are not checked for. As a special
|
||||
case, U+FEFF is excluded from Arabic Presentation Forms-B.</p>
|
||||
<p>Returns <code>true</code> if the input contains an RTL character or an unpaired
|
||||
high surrogate that could be the high half of an RTL character.
|
||||
Returns <code>false</code> if the input contains neither RTL characters nor
|
||||
unpaired high surrogates that could be higher halves of RTL characters.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,21 @@
|
||||
<!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="Checks whether a UTF-16 code unit triggers right-to-left processing."><meta name="keywords" content="rust, rustlang, rust-lang, is_utf16_code_unit_bidi"><title>encoding_rs::mem::is_utf16_code_unit_bidi - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="is_utf16_code_unit_bidi" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">is_utf16_code_unit_bidi</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#1377-1408" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn is_utf16_code_unit_bidi(u: u16) -> bool</pre><div class="docblock"><p>Checks whether a UTF-16 code unit triggers right-to-left processing.</p>
|
||||
<p>The check is done on a Unicode block basis without regard to assigned
|
||||
vs. unassigned code points in the block. Hebrew presentation forms in
|
||||
the Alphabetic Presentation Forms block are treated as if they formed
|
||||
a block on their own (i.e. it treated as right-to-left). Additionally,
|
||||
the four RIGHT-TO-LEFT FOO controls in General Punctuation are checked
|
||||
for. Control characters that are technically bidi controls but do not
|
||||
cause right-to-left behavior without the presence of right-to-left
|
||||
characters or right-to-left controls are not checked for. As a special
|
||||
case, U+FEFF is excluded from Arabic Presentation Forms-B.</p>
|
||||
<p>Since supplementary-plane right-to-left blocks are identifiable from the
|
||||
high surrogate without examining the low surrogate, this function returns
|
||||
<code>true</code> for such high surrogates making the function suitable for handling
|
||||
supplementary-plane text without decoding surrogate pairs to scalar
|
||||
values. Obviously, such high surrogates are then reported as right-to-left
|
||||
even if actually unpaired.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,9 @@
|
||||
<!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="Checks whether the buffer represents only code point less than or equal to U+00FF."><meta name="keywords" content="rust, rustlang, rust-lang, is_utf16_latin1"><title>encoding_rs::mem::is_utf16_latin1 - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="is_utf16_latin1" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">is_utf16_latin1</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#675-677" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn is_utf16_latin1(buffer: &[u16]) -> bool</pre><div class="docblock"><p>Checks whether the buffer represents only code point less than or equal
|
||||
to U+00FF.</p>
|
||||
<p>May read the entire buffer even if it isn’t all-Latin1. (I.e. the function
|
||||
is not guaranteed to fail fast.)</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,19 @@
|
||||
<!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="Checks whether a potentially-invalid UTF-8 buffer contains code points that trigger right-to-left processing."><meta name="keywords" content="rust, rustlang, rust-lang, is_utf8_bidi"><title>encoding_rs::mem::is_utf8_bidi - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="is_utf8_bidi" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">is_utf8_bidi</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#697-1111" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn is_utf8_bidi(buffer: &[u8]) -> bool</pre><div class="docblock"><p>Checks whether a potentially-invalid UTF-8 buffer contains code points
|
||||
that trigger right-to-left processing.</p>
|
||||
<p>The check is done on a Unicode block basis without regard to assigned
|
||||
vs. unassigned code points in the block. Hebrew presentation forms in
|
||||
the Alphabetic Presentation Forms block are treated as if they formed
|
||||
a block on their own (i.e. it treated as right-to-left). Additionally,
|
||||
the four RIGHT-TO-LEFT FOO controls in General Punctuation are checked
|
||||
for. Control characters that are technically bidi controls but do not
|
||||
cause right-to-left behavior without the presence of right-to-left
|
||||
characters or right-to-left controls are not checked for. As a special
|
||||
case, U+FEFF is excluded from Arabic Presentation Forms-B.</p>
|
||||
<p>Returns <code>true</code> if the input is invalid UTF-8 or the input contains an
|
||||
RTL character. Returns <code>false</code> if the input is valid UTF-8 and contains
|
||||
no RTL characters.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,9 @@
|
||||
<!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="Checks whether the buffer is valid UTF-8 representing only code points less than or equal to U+00FF."><meta name="keywords" content="rust, rustlang, rust-lang, is_utf8_latin1"><title>encoding_rs::mem::is_utf8_latin1 - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="is_utf8_latin1" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">is_utf8_latin1</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#657-659" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn is_utf8_latin1(buffer: &[u8]) -> bool</pre><div class="docblock"><p>Checks whether the buffer is valid UTF-8 representing only code points
|
||||
less than or equal to U+00FF.</p>
|
||||
<p>Fails fast. (I.e. returns before having read the whole buffer if UTF-8
|
||||
invalidity or code points above U+00FF are discovered.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,7 @@
|
||||
<!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="Returns the index of first byte that starts a non-Latin1 byte sequence, or the length of the string if there are none."><meta name="keywords" content="rust, rustlang, rust-lang, str_latin1_up_to"><title>encoding_rs::mem::str_latin1_up_to - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="str_latin1_up_to" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">str_latin1_up_to</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#2060-2062" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn str_latin1_up_to(buffer: &str) -> usize</pre><div class="docblock"><p>Returns the index of first byte that starts a non-Latin1 byte
|
||||
sequence, or the length of the string if there are none.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,7 @@
|
||||
<!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="Returns the index of the first unpaired surrogate or, if the input is valid UTF-16 in its entirety, the length of the input."><meta name="keywords" content="rust, rustlang, rust-lang, utf16_valid_up_to"><title>encoding_rs::mem::utf16_valid_up_to - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="utf16_valid_up_to" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">utf16_valid_up_to</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#2047-2049" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn utf16_valid_up_to(buffer: &[u16]) -> usize</pre><div class="docblock"><p>Returns the index of the first unpaired surrogate or, if the input is
|
||||
valid UTF-16 in its entirety, the length of the input.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,8 @@
|
||||
<!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="Returns the index of first byte that starts an invalid byte sequence or a non-Latin1 byte sequence, or the length of the string if there are neither."><meta name="keywords" content="rust, rustlang, rust-lang, utf8_latin1_up_to"><title>encoding_rs::mem::utf8_latin1_up_to - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a></p><div id="sidebar-vars" data-name="utf8_latin1_up_to" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">encoding_rs</a>::<wbr><a href="index.html">mem</a>::<wbr><a class="fn" href="">utf8_latin1_up_to</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#2054-2056" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn utf8_latin1_up_to(buffer: &[u8]) -> usize</pre><div class="docblock"><p>Returns the index of first byte that starts an invalid byte
|
||||
sequence or a non-Latin1 byte sequence, or the length of the
|
||||
string if there are neither.</p>
|
||||
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
@@ -0,0 +1,106 @@
|
||||
<!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="Functions for converting between different in-RAM representations of text and for quickly checking if the Unicode Bidirectional Algorithm can be avoided."><meta name="keywords" content="rust, rustlang, rust-lang, mem"><title>encoding_rs::mem - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../encoding_rs/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module mem</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../index.html">encoding_rs</a></p><div id="sidebar-vars" data-name="mem" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">encoding_rs</a>::<wbr><a class="mod" href="">mem</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/encoding_rs/mem.rs.html#10-3347" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Functions for converting between different in-RAM representations of text
|
||||
and for quickly checking if the Unicode Bidirectional Algorithm can be
|
||||
avoided.</p>
|
||||
<p>By using slices for output, the functions here seek to enable by-register
|
||||
(ALU register or SIMD register as available) operations in order to
|
||||
outperform iterator-based conversions available in the Rust standard
|
||||
library.</p>
|
||||
<p><em>Note:</em> “Latin1” in this module refers to the Unicode range from U+0000 to
|
||||
U+00FF, inclusive, and does not refer to the windows-1252 range. This
|
||||
in-memory encoding is sometimes used as a storage optimization of text
|
||||
when UTF-16 indexing and length semantics are exposed.</p>
|
||||
<p>The FFI binding for this module are in the
|
||||
<a href="https://github.com/hsivonen/encoding_c_mem">encoding_c_mem crate</a>.</p>
|
||||
</div><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
|
||||
<table><tr class="module-item"><td><a class="enum" href="enum.Latin1Bidi.html" title="encoding_rs::mem::Latin1Bidi enum">Latin1Bidi</a></td><td class="docblock-short"><p>Classification of text as Latin1 (all code points are below U+0100),
|
||||
left-to-right with some non-Latin1 characters or as containing at least
|
||||
some right-to-left characters.</p>
|
||||
</td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
|
||||
<table><tr class="module-item"><td><a class="fn" href="fn.check_str_for_latin1_and_bidi.html" title="encoding_rs::mem::check_str_for_latin1_and_bidi fn">check_str_for_latin1_and_bidi</a></td><td class="docblock-short"><p>Checks whether a valid UTF-8 buffer contains code points
|
||||
that trigger right-to-left processing or is all-Latin1.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.check_utf8_for_latin1_and_bidi.html" title="encoding_rs::mem::check_utf8_for_latin1_and_bidi fn">check_utf8_for_latin1_and_bidi</a></td><td class="docblock-short"><p>Checks whether a potentially invalid UTF-8 buffer contains code points
|
||||
that trigger right-to-left processing or is all-Latin1.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.check_utf16_for_latin1_and_bidi.html" title="encoding_rs::mem::check_utf16_for_latin1_and_bidi fn">check_utf16_for_latin1_and_bidi</a></td><td class="docblock-short"><p>Checks whether a potentially invalid UTF-16 buffer contains code points
|
||||
that trigger right-to-left processing or is all-Latin1.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.convert_latin1_to_str.html" title="encoding_rs::mem::convert_latin1_to_str fn">convert_latin1_to_str</a></td><td class="docblock-short"><p>Converts bytes whose unsigned value is interpreted as Unicode code point
|
||||
(i.e. U+0000 to U+00FF, inclusive) to UTF-8 such that the validity of the
|
||||
output is signaled using the Rust type system.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.convert_latin1_to_str_partial.html" title="encoding_rs::mem::convert_latin1_to_str_partial fn">convert_latin1_to_str_partial</a></td><td class="docblock-short"><p>Converts bytes whose unsigned value is interpreted as Unicode code point
|
||||
(i.e. U+0000 to U+00FF, inclusive) to UTF-8 such that the validity of the
|
||||
output is signaled using the Rust type system with potentially insufficient
|
||||
output space.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.convert_latin1_to_utf8.html" title="encoding_rs::mem::convert_latin1_to_utf8 fn">convert_latin1_to_utf8</a></td><td class="docblock-short"><p>Converts bytes whose unsigned value is interpreted as Unicode code point
|
||||
(i.e. U+0000 to U+00FF, inclusive) to UTF-8.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.convert_latin1_to_utf8_partial.html" title="encoding_rs::mem::convert_latin1_to_utf8_partial fn">convert_latin1_to_utf8_partial</a></td><td class="docblock-short"><p>Converts bytes whose unsigned value is interpreted as Unicode code point
|
||||
(i.e. U+0000 to U+00FF, inclusive) to UTF-8 with potentially insufficient
|
||||
output space.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.convert_latin1_to_utf16.html" title="encoding_rs::mem::convert_latin1_to_utf16 fn">convert_latin1_to_utf16</a></td><td class="docblock-short"><p>Converts bytes whose unsigned value is interpreted as Unicode code point
|
||||
(i.e. U+0000 to U+00FF, inclusive) to UTF-16.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.convert_str_to_utf16.html" title="encoding_rs::mem::convert_str_to_utf16 fn">convert_str_to_utf16</a></td><td class="docblock-short"><p>Converts valid UTF-8 to valid UTF-16.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.convert_utf8_to_latin1_lossy.html" title="encoding_rs::mem::convert_utf8_to_latin1_lossy fn">convert_utf8_to_latin1_lossy</a></td><td class="docblock-short"><p>If the input is valid UTF-8 representing only Unicode code points from
|
||||
U+0000 to U+00FF, inclusive, converts the input into output that
|
||||
represents the value of each code point as the unsigned byte value of
|
||||
each output byte.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.convert_utf8_to_utf16.html" title="encoding_rs::mem::convert_utf8_to_utf16 fn">convert_utf8_to_utf16</a></td><td class="docblock-short"><p>Converts potentially-invalid UTF-8 to valid UTF-16 with errors replaced
|
||||
with the REPLACEMENT CHARACTER.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.convert_utf8_to_utf16_without_replacement.html" title="encoding_rs::mem::convert_utf8_to_utf16_without_replacement fn">convert_utf8_to_utf16_without_replacement</a></td><td class="docblock-short"><p>Converts potentially-invalid UTF-8 to valid UTF-16 signaling on error.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.convert_utf16_to_latin1_lossy.html" title="encoding_rs::mem::convert_utf16_to_latin1_lossy fn">convert_utf16_to_latin1_lossy</a></td><td class="docblock-short"><p>If the input is valid UTF-16 representing only Unicode code points from
|
||||
U+0000 to U+00FF, inclusive, converts the input into output that
|
||||
represents the value of each code point as the unsigned byte value of
|
||||
each output byte.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.convert_utf16_to_str.html" title="encoding_rs::mem::convert_utf16_to_str fn">convert_utf16_to_str</a></td><td class="docblock-short"><p>Converts potentially-invalid UTF-16 to valid UTF-8 with errors replaced
|
||||
with the REPLACEMENT CHARACTER such that the validity of the output is
|
||||
signaled using the Rust type system.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.convert_utf16_to_str_partial.html" title="encoding_rs::mem::convert_utf16_to_str_partial fn">convert_utf16_to_str_partial</a></td><td class="docblock-short"><p>Converts potentially-invalid UTF-16 to valid UTF-8 with errors replaced
|
||||
with the REPLACEMENT CHARACTER such that the validity of the output is
|
||||
signaled using the Rust type system with potentially insufficient output
|
||||
space.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.convert_utf16_to_utf8.html" title="encoding_rs::mem::convert_utf16_to_utf8 fn">convert_utf16_to_utf8</a></td><td class="docblock-short"><p>Converts potentially-invalid UTF-16 to valid UTF-8 with errors replaced
|
||||
with the REPLACEMENT CHARACTER.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.convert_utf16_to_utf8_partial.html" title="encoding_rs::mem::convert_utf16_to_utf8_partial fn">convert_utf16_to_utf8_partial</a></td><td class="docblock-short"><p>Converts potentially-invalid UTF-16 to valid UTF-8 with errors replaced
|
||||
with the REPLACEMENT CHARACTER with potentially insufficient output
|
||||
space.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.copy_ascii_to_ascii.html" title="encoding_rs::mem::copy_ascii_to_ascii fn">copy_ascii_to_ascii</a></td><td class="docblock-short"><p>Copies ASCII from source to destination up to the first non-ASCII byte
|
||||
(or the end of the input if it is ASCII in its entirety).</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.copy_ascii_to_basic_latin.html" title="encoding_rs::mem::copy_ascii_to_basic_latin fn">copy_ascii_to_basic_latin</a></td><td class="docblock-short"><p>Copies ASCII from source to destination zero-extending it to UTF-16 up to
|
||||
the first non-ASCII byte (or the end of the input if it is ASCII in its
|
||||
entirety).</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.copy_basic_latin_to_ascii.html" title="encoding_rs::mem::copy_basic_latin_to_ascii fn">copy_basic_latin_to_ascii</a></td><td class="docblock-short"><p>Copies Basic Latin from source to destination narrowing it to ASCII up to
|
||||
the first non-Basic Latin code unit (or the end of the input if it is
|
||||
Basic Latin in its entirety).</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.decode_latin1.html" title="encoding_rs::mem::decode_latin1 fn">decode_latin1</a></td><td class="docblock-short"><p>Converts bytes whose unsigned value is interpreted as Unicode code point
|
||||
(i.e. U+0000 to U+00FF, inclusive) to UTF-8.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.encode_latin1_lossy.html" title="encoding_rs::mem::encode_latin1_lossy fn">encode_latin1_lossy</a></td><td class="docblock-short"><p>If the input is valid UTF-8 representing only Unicode code points from
|
||||
U+0000 to U+00FF, inclusive, converts the input into output that
|
||||
represents the value of each code point as the unsigned byte value of
|
||||
each output byte.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.ensure_utf16_validity.html" title="encoding_rs::mem::ensure_utf16_validity fn">ensure_utf16_validity</a></td><td class="docblock-short"><p>Replaces unpaired surrogates in the input with the REPLACEMENT CHARACTER.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.is_ascii.html" title="encoding_rs::mem::is_ascii fn">is_ascii</a></td><td class="docblock-short"><p>Checks whether the buffer is all-ASCII.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.is_basic_latin.html" title="encoding_rs::mem::is_basic_latin fn">is_basic_latin</a></td><td class="docblock-short"><p>Checks whether the buffer is all-Basic Latin (i.e. UTF-16 representing
|
||||
only ASCII characters).</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.is_char_bidi.html" title="encoding_rs::mem::is_char_bidi fn">is_char_bidi</a></td><td class="docblock-short"><p>Checks whether a scalar value triggers right-to-left processing.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.is_str_bidi.html" title="encoding_rs::mem::is_str_bidi fn">is_str_bidi</a></td><td class="docblock-short"><p>Checks whether a valid UTF-8 buffer contains code points that trigger
|
||||
right-to-left processing.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.is_str_latin1.html" title="encoding_rs::mem::is_str_latin1 fn">is_str_latin1</a></td><td class="docblock-short"><p>Checks whether the buffer represents only code points less than or equal
|
||||
to U+00FF.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.is_utf8_bidi.html" title="encoding_rs::mem::is_utf8_bidi fn">is_utf8_bidi</a></td><td class="docblock-short"><p>Checks whether a potentially-invalid UTF-8 buffer contains code points
|
||||
that trigger right-to-left processing.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.is_utf8_latin1.html" title="encoding_rs::mem::is_utf8_latin1 fn">is_utf8_latin1</a></td><td class="docblock-short"><p>Checks whether the buffer is valid UTF-8 representing only code points
|
||||
less than or equal to U+00FF.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.is_utf16_bidi.html" title="encoding_rs::mem::is_utf16_bidi fn">is_utf16_bidi</a></td><td class="docblock-short"><p>Checks whether a UTF-16 buffer contains code points that trigger
|
||||
right-to-left processing.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.is_utf16_code_unit_bidi.html" title="encoding_rs::mem::is_utf16_code_unit_bidi fn">is_utf16_code_unit_bidi</a></td><td class="docblock-short"><p>Checks whether a UTF-16 code unit triggers right-to-left processing.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.is_utf16_latin1.html" title="encoding_rs::mem::is_utf16_latin1 fn">is_utf16_latin1</a></td><td class="docblock-short"><p>Checks whether the buffer represents only code point less than or equal
|
||||
to U+00FF.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.str_latin1_up_to.html" title="encoding_rs::mem::str_latin1_up_to fn">str_latin1_up_to</a></td><td class="docblock-short"><p>Returns the index of first byte that starts a non-Latin1 byte
|
||||
sequence, or the length of the string if there are none.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.utf8_latin1_up_to.html" title="encoding_rs::mem::utf8_latin1_up_to fn">utf8_latin1_up_to</a></td><td class="docblock-short"><p>Returns the index of first byte that starts an invalid byte
|
||||
sequence or a non-Latin1 byte sequence, or the length of the
|
||||
string if there are neither.</p>
|
||||
</td></tr><tr class="module-item"><td><a class="fn" href="fn.utf16_valid_up_to.html" title="encoding_rs::mem::utf16_valid_up_to fn">utf16_valid_up_to</a></td><td class="docblock-short"><p>Returns the index of the first unpaired surrogate or, if the input is
|
||||
valid UTF-16 in its entirety, the length of the input.</p>
|
||||
</td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs"></div>
|
||||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user