Files
google-apis-rs/darling_core/util/index.html
2024-03-05 21:06:01 +01:00

11 lines
8.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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="Utility types for attribute parsing."><title>darling_core::util - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-ac92e1bbe349e143.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="darling_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)" data-channel="1.76.0" data-search-js="search-2b6ce74ff89ae146.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-f2adc0d6ca4d09fb.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-305769736d49e732.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-feafe1bb7466e4bd.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../darling_core/index.html">darling_core</a><span class="version">0.20.3</span></h2></div><h2 class="location"><a href="#">Module util</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></section><h2><a href="../index.html">In crate darling_core</a></h2></div></nav><div class="sidebar-resizer"></div>
<main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../darling_core/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../index.html">darling_core</a>::<wbr><a class="mod" href="#">util</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/darling_core/util/mod.rs.html#1-24">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Utility types for attribute parsing.</p>
</div></details><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="parse_expr/index.html" title="mod darling_core::util::parse_expr">parse_expr</a></div><div class="desc docblock-short">Functions to use with <code>#[darling(with = &quot;...&quot;)]</code> that control how quoted values
in <a href="../../syn/attr/enum.Meta.html" title="enum syn::attr::Meta"><code>Meta</code></a> instances are parsed into <a href="../../syn/expr/enum.Expr.html" title="enum syn::expr::Expr"><code>Expr</code></a> fields.</div></li></ul><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Flag.html" title="struct darling_core::util::Flag">Flag</a></div><div class="desc docblock-short">A meta-item that can be present as a word - with no value - or absent.</div></li><li><div class="item-name"><a class="struct" href="struct.IdentString.html" title="struct darling_core::util::IdentString">IdentString</a></div><div class="desc docblock-short">A wrapper for an <code>Ident</code> which also keeps the value as a string.</div></li><li><div class="item-name"><a class="struct" href="struct.Ignored.html" title="struct darling_core::util::Ignored">Ignored</a></div><div class="desc docblock-short">An efficient way of discarding data from a syntax element.</div></li><li><div class="item-name"><a class="struct" href="struct.PathList.html" title="struct darling_core::util::PathList">PathList</a></div><div class="desc docblock-short">A list of <code>syn::Path</code> instances. This type is used to extract a list of paths from an
attribute.</div></li><li><div class="item-name"><a class="struct" href="struct.ShapeSet.html" title="struct darling_core::util::ShapeSet">ShapeSet</a></div><div class="desc docblock-short">A set of <a href="enum.Shape.html" title="enum darling_core::util::Shape"><code>Shape</code></a> values, which correctly handles the relationship between
<a href="enum.Shape.html#variant.Newtype" title="enum darling_core::util::Shape">newtype</a> and <a href="enum.Shape.html#variant.Tuple" title="enum darling_core::util::Shape">tuple</a> shapes.</div></li><li><div class="item-name"><a class="struct" href="struct.SpannedValue.html" title="struct darling_core::util::SpannedValue">SpannedValue</a></div><div class="desc docblock-short">A value and an associated position in source code. The main use case for this is
to preserve position information to emit warnings from proc macros. You can use
a <code>SpannedValue&lt;T&gt;</code> as a field in any struct that implements or derives any of
<code>darling</code>s core traits.</div></li><li><div class="item-name"><a class="struct" href="struct.WithOriginal.html" title="struct darling_core::util::WithOriginal">WithOriginal</a></div><div class="desc docblock-short">A container to parse some syntax and retain access to the original.</div></li></ul><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.Override.html" title="enum darling_core::util::Override">Override</a></div><div class="desc docblock-short">A value which can inherit a default value or have an explicit value specified.</div></li><li><div class="item-name"><a class="enum" href="enum.Shape.html" title="enum darling_core::util::Shape">Shape</a></div><div class="desc docblock-short">Description of how fields in a struct or variant are syntactically laid out.</div></li></ul><h2 id="traits" class="section-header"><a href="#traits">Traits</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.AsShape.html" title="trait darling_core::util::AsShape">AsShape</a></div><div class="desc docblock-short">Get the “shape” of a fields container, such as a struct or variant.</div></li></ul><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.parse_attribute_to_meta_list.html" title="fn darling_core::util::parse_attribute_to_meta_list">parse_attribute_to_meta_list</a></div><div class="desc docblock-short">Try to parse an attribute into a meta list. Path-type meta values are accepted and returned
as empty lists with their passed-in path. Name-value meta values and non-meta attributes
will cause errors to be returned.</div></li><li><div class="item-name"><a class="fn" href="fn.path_to_string.html" title="fn darling_core::util::path_to_string">path_to_string</a></div><div class="desc docblock-short">Transform Rust paths to a readable and comparable string.</div></li></ul></section></div></main></body></html>