1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-24 07:53:00 +01:00
actix-extras/actix_settings/trait.Parse.html

7 lines
27 KiB
HTML
Raw Normal View History

<!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="A specialized `FromStr` trait that returns [`AtError`] errors"><meta name="keywords" content="rust, rustlang, rust-lang, Parse"><title>Parse in actix_settings - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../normalize.css"><link rel="stylesheet" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../ayu.css" disabled><link rel="stylesheet" href="../dark.css" disabled><link rel="stylesheet" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../actix_settings/index.html"><div class="logo-container"><img src="https://actix.rs/img/logo.png" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../actix_settings/index.html"><div class="logo-container">
<img src="https://actix.rs/img/logo.png" alt="logo"></div></a><h2 class="location"><a href="#">Parse</a></h2><div class="sidebar-elems"><section><div class="block"><h3 class="sidebar-title"><a href="#required-methods">Required Methods</a></h3><ul><li><a href="#tymethod.parse">parse</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul><li><a href="#impl-Parse-for-PathBuf">PathBuf</a></li><li><a href="#impl-Parse-for-String">String</a></li><li><a href="#impl-Parse-for-Vec%3CAddress%3E">Vec&lt;Address&gt;</a></li><li><a href="#impl-Parse-for-bool">bool</a></li><li><a href="#impl-Parse-for-i128">i128</a></li><li><a href="#impl-Parse-for-i16">i16</a></li><li><a href="#impl-Parse-for-i32">i32</a></li><li><a href="#impl-Parse-for-i64">i64</a></li><li><a href="#impl-Parse-for-i8">i8</a></li><li><a href="#impl-Parse-for-u128">u128</a></li><li><a href="#impl-Parse-for-u16">u16</a></li><li><a href="#impl-Parse-for-u32">u32</a></li><li><a href="#impl-Parse-for-u64">u64</a></li><li><a href="#impl-Parse-for-u8">u8</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div></section><h2 class="location"><a href="index.html">In actix_settings</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../actix_settings/index.html">
<img src="https://actix.rs/img/logo.png" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Trait <a href="index.html">actix_settings</a>::<wbr><a class="trait" href="#">Parse</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/actix_settings/parse.rs.html#6-9">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust trait"><code>pub trait Parse: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> {
fn <a href="#tymethod.parse" class="fnname">parse</a>(string: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, <a class="enum" href="enum.Error.html" title="enum actix_settings::Error">Error</a>&gt;;
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A specialized <code>FromStr</code> trait that returns [<code>AtError</code>] errors</p>
</div></details><h2 id="required-methods" class="small-section-header">Required Methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="tymethod.parse" class="method has-srclink"><a class="srclink rightside" href="../src/actix_settings/parse.rs.html#8">source</a><h4 class="code-header">fn <a href="#tymethod.parse" class="fnname">parse</a>(string: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, <a class="enum" href="enum.Error.html" title="enum actix_settings::Error">Error</a>&gt;</h4></div></summary><div class="docblock"><p>Parse <code>Self</code> from <code>string</code>.</p>
</div></details></div><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Parse-for-bool" class="impl has-srclink"><a class="srclink rightside" href="../src/actix_settings/parse.rs.html#11-15">source</a><a href="#impl-Parse-for-bool" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.Parse.html" title="trait actix_settings::Parse">Parse</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h3></section></summary><div class="impl-items"><section id="method.parse" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/actix_settings/parse.rs.html#12-14">source</a><a href="#method.parse" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.parse" class="fnname">parse</a>(string: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, <a class="enum" href="enum.Error.html" title="enum actix_settings::Error">Error</a>&gt;</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Parse-for-i8" class="impl has-srclink"><a class="srclink rightside" href="../src/actix_settings/parse.rs.html#28">source</a><a href="#impl-Parse-for-i8" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.Parse.html" title="trait actix_settings::Parse">Parse</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a></h3></section></summary><div class="impl-items"><section id="method.parse-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/actix_settings/parse.rs.html#28">source</a><a href="#method.parse-1" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.parse" class="fnname">parse</a>(string: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, <a class="enum" href="enum.Error.html" title="enum actix_settings::Error">Error</a>&gt;</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Parse-for-i16" class="impl has-srclink"><a class="srclink rightside" href="../src/actix_settings/parse.rs.html#28">source</a><a href="#impl-Parse-for-i16" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.Parse.html" title="trait actix_settings::Parse">Parse</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></h3></section></summary><div class="impl-items"><section id="method.parse-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../src/actix_settings/parse.rs.html#28">source</a><a href="#method.parse-2" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.parse" class="fnname">parse</a>(string: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, <a class="enum" href="enum.Error.html" title="enum actix_settings::Error">Error</a>&gt;</h4></section></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Parse-for-i32" class="impl has-srclink"><a class="srclink rightside" href="../src/actix_settings/parse.rs.html#28">source</a><a href="#impl-Parse-for-i32" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.Parse.html" title="trait actix_settings::Parse">Parse</a> for <a class="primitive" href="https://doc.rust-lang.org/