edlang/lalrpop_util/state_machine/trait.ParserAction.html
2024-07-26 09:42:18 +00:00

8 lines
18 KiB
HTML

<!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="API documentation for the Rust `ParserAction` trait in crate `lalrpop_util`."><title>ParserAction in lalrpop_util::state_machine - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-dd39b87e5fcfba68.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="lalrpop_util" data-themes="" data-resource-suffix="" data-rustdoc-version="1.80.0 (051478957 2024-07-21)" data-channel="1.80.0" data-search-js="search-d52510db62a78183.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-20a3ad099b048cf2.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-df360f571f6edeae.css"></noscript><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 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" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../lalrpop_util/index.html">lalrpop_util</a><span class="version">0.20.2</span></h2></div><h2 class="location"><a href="#">ParserAction</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.as_reduce">as_reduce</a></li><li><a href="#tymethod.as_shift">as_shift</a></li><li><a href="#tymethod.is_error">is_error</a></li><li><a href="#tymethod.is_reduce">is_reduce</a></li><li><a href="#tymethod.is_shift">is_shift</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-ParserAction%3CD%3E-for-i16">i16</a></li><li><a href="#impl-ParserAction%3CD%3E-for-i32">i32</a></li><li><a href="#impl-ParserAction%3CD%3E-for-i8">i8</a></li></ul><h3><a href="#object-safety">Object Safety</a></h3><h3><a href="#implementors">Implementors</a></h3></section><h2><a href="index.html">In lalrpop_util::state_machine</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../index.html">lalrpop_util</a>::<wbr><a href="index.html">state_machine</a>::<wbr><a class="trait" href="#">ParserAction</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/lalrpop_util/state_machine.rs.html#155-161">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub trait ParserAction&lt;D: <a class="trait" href="trait.ParserDefinition.html" title="trait lalrpop_util::state_machine::ParserDefinition">ParserDefinition</a>&gt;: <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> + <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="https://doc.rust-lang.org/1.80.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> {
// Required methods
fn <a href="#tymethod.as_shift" class="fn">as_shift</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;D::<a class="associatedtype" href="trait.ParserDefinition.html#associatedtype.StateIndex" title="type lalrpop_util::state_machine::ParserDefinition::StateIndex">StateIndex</a>&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.as_reduce" class="fn">as_reduce</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;D::<a class="associatedtype" href="trait.ParserDefinition.html#associatedtype.ReduceIndex" title="type lalrpop_util::state_machine::ParserDefinition::ReduceIndex">ReduceIndex</a>&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.is_shift" class="fn">is_shift</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.is_reduce" class="fn">is_reduce</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.is_error" class="fn">is_error</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a>;
}</code></pre><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><section id="tymethod.as_shift" class="method"><a class="src rightside" href="../../src/lalrpop_util/state_machine.rs.html#156">source</a><h4 class="code-header">fn <a href="#tymethod.as_shift" class="fn">as_shift</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;D::<a class="associatedtype" href="trait.ParserDefinition.html#associatedtype.StateIndex" title="type lalrpop_util::state_machine::ParserDefinition::StateIndex">StateIndex</a>&gt;</h4></section><section id="tymethod.as_reduce" class="method"><a class="src rightside" href="../../src/lalrpop_util/state_machine.rs.html#157">source</a><h4 class="code-header">fn <a href="#tymethod.as_reduce" class="fn">as_reduce</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;D::<a class="associatedtype" href="trait.ParserDefinition.html#associatedtype.ReduceIndex" title="type lalrpop_util::state_machine::ParserDefinition::ReduceIndex">ReduceIndex</a>&gt;</h4></section><section id="tymethod.is_shift" class="method"><a class="src rightside" href="../../src/lalrpop_util/state_machine.rs.html#158">source</a><h4 class="code-header">fn <a href="#tymethod.is_shift" class="fn">is_shift</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section><section id="tymethod.is_reduce" class="method"><a class="src rightside" href="../../src/lalrpop_util/state_machine.rs.html#159">source</a><h4 class="code-header">fn <a href="#tymethod.is_reduce" class="fn">is_reduce</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section><section id="tymethod.is_error" class="method"><a class="src rightside" href="../../src/lalrpop_util/state_machine.rs.html#160">source</a><h4 class="code-header">fn <a href="#tymethod.is_error" class="fn">is_error</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></div><h2 id="object-safety" class="section-header">Object Safety<a href="#object-safety" class="anchor">§</a></h2><div class="object-safety-info">This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.80.0/reference/items/traits.html#object-safety">object safe</a>.</div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-ParserAction%3CD%3E-for-i8" class="impl"><a class="src rightside" href="../../src/lalrpop_util/state_machine.rs.html#679">source</a><a href="#impl-ParserAction%3CD%3E-for-i8" class="anchor">§</a><h3 class="code-header">impl&lt;D: <a class="trait" href="trait.ParserDefinition.html" title="trait lalrpop_util::state_machine::ParserDefinition">ParserDefinition</a>&lt;StateIndex = <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.i8.html">i8</a>, ReduceIndex = <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.i8.html">i8</a>&gt;&gt; <a class="trait" href="trait.ParserAction.html" title="trait lalrpop_util::state_machine::ParserAction">ParserAction</a>&lt;D&gt; for <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.i8.html">i8</a></h3></section></summary><div class="impl-items"><section id="method.as_shift" class="method trait-impl"><a class="src rightside" href="../../src/lalrpop_util/state_machine.rs.html#679">source</a><a href="#method.as_shift" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.as_shift" class="fn">as_shift</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;D::<a class="associatedtype" href="trait.ParserDefinition.html#associatedtype.StateIndex" title="type lalrpop_util::state_machine::ParserDefinition::StateIndex">StateIndex</a>&gt;</h4></section><section id="method.as_reduce" class="method trait-impl"><a class="src rightside" href="../../src/lalrpop_util/state_machine.rs.html#679">source</a><a href="#method.as_reduce" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.as_reduce" class="fn">as_reduce</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;D::<a class="associatedtype" href="trait.ParserDefinition.html#associatedtype.ReduceIndex" title="type lalrpop_util::state_machine::ParserDefinition::ReduceIndex">ReduceIndex</a>&gt;</h4></section><section id="method.is_shift" class="method trait-impl"><a class="src rightside" href="../../src/lalrpop_util/state_machine.rs.html#679">source</a><a href="#method.is_shift" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.is_shift" class="fn">is_shift</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section><section id="method.is_reduce" class="method trait-impl"><a class="src rightside" href="../../src/lalrpop_util/state_machine.rs.html#679">source</a><a href="#method.is_reduce" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.is_reduce" class="fn">is_reduce</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section><section id="method.is_error" class="method trait-impl"><a class="src rightside" href="../../src/lalrpop_util/state_machine.rs.html#679">source</a><a href="#method.is_error" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.is_error" class="fn">is_error</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ParserAction%3CD%3E-for-i16" class="impl"><a class="src rightside" href="../../src/lalrpop_util/state_machine.rs.html#678">source</a><a href="#impl-ParserAction%3CD%3E-for-i16" class="anchor">§</a><h3 class="code-header">impl&lt;D: <a class="trait" href="trait.ParserDefinition.html" title="trait lalrpop_util::state_machine::ParserDefinition">ParserDefinition</a>&lt;StateIndex = <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.i16.html">i16</a>, ReduceIndex = <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.i16.html">i16</a>&gt;&gt; <a class="trait" href="trait.ParserAction.html" title="trait lalrpop_util::state_machine::ParserAction">ParserAction</a>&lt;D&gt; for <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.i16.html">i16</a></h3></section></summary><div class="impl-items"><section id="method.as_shift-1" class="method trait-impl"><a class="src rightside" href="../../src/lalrpop_util/state_machine.rs.html#678">source</a><a href="#method.as_shift-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.as_shift" class="fn">as_shift</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;D::<a class="associatedtype" href="trait.ParserDefinition.html#associatedtype.StateIndex" title="type lalrpop_util::state_machine::ParserDefinition::StateIndex">StateIndex</a>&gt;</h4></section><section id="method.as_reduce-1" class="method trait-impl"><a class="src rightside" href="../../src/lalrpop_util/state_machine.rs.html#678">source</a><a href="#method.as_reduce-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.as_reduce" class="fn">as_reduce</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;D::<a class="associatedtype" href="trait.ParserDefinition.html#associatedtype.ReduceIndex" title="type lalrpop_util::state_machine::ParserDefinition::ReduceIndex">ReduceIndex</a>&gt;</h4></section><section id="method.is_shift-1" class="method trait-impl"><a class="src rightside" href="../../src/lalrpop_util/state_machine.rs.html#678">source</a><a href="#method.is_shift-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.is_shift" class="fn">is_shift</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section><section id="method.is_reduce-1" class="method trait-impl"><a class="src rightside" href="../../src/lalrpop_util/state_machine.rs.html#678">source</a><a href="#method.is_reduce-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.is_reduce" class="fn">is_reduce</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section><section id="method.is_error-1" class="method trait-impl"><a class="src rightside" href="../../src/lalrpop_util/state_machine.rs.html#678">source</a><a href="#method.is_error-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.is_error" class="fn">is_error</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ParserAction%3CD%3E-for-i32" class="impl"><a class="src rightside" href="../../src/lalrpop_util/state_machine.rs.html#677">source</a><a href="#impl-ParserAction%3CD%3E-for-i32" class="anchor">§</a><h3 class="code-header">impl&lt;D: <a class="trait" href="trait.ParserDefinition.html" title="trait lalrpop_util::state_machine::ParserDefinition">ParserDefinition</a>&lt;StateIndex = <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.i32.html">i32</a>, ReduceIndex = <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.i32.html">i32</a>&gt;&gt; <a class="trait" href="trait.ParserAction.html" title="trait lalrpop_util::state_machine::ParserAction">ParserAction</a>&lt;D&gt; for <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.i32.html">i32</a></h3></section></summary><div class="impl-items"><section id="method.as_shift-2" class="method trait-impl"><a class="src rightside" href="../../src/lalrpop_util/state_machine.rs.html#677">source</a><a href="#method.as_shift-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.as_shift" class="fn">as_shift</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;D::<a class="associatedtype" href="trait.ParserDefinition.html#associatedtype.StateIndex" title="type lalrpop_util::state_machine::ParserDefinition::StateIndex">StateIndex</a>&gt;</h4></section><section id="method.as_reduce-2" class="method trait-impl"><a class="src rightside" href="../../src/lalrpop_util/state_machine.rs.html#677">source</a><a href="#method.as_reduce-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.as_reduce" class="fn">as_reduce</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.80.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;D::<a class="associatedtype" href="trait.ParserDefinition.html#associatedtype.ReduceIndex" title="type lalrpop_util::state_machine::ParserDefinition::ReduceIndex">ReduceIndex</a>&gt;</h4></section><section id="method.is_shift-2" class="method trait-impl"><a class="src rightside" href="../../src/lalrpop_util/state_machine.rs.html#677">source</a><a href="#method.is_shift-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.is_shift" class="fn">is_shift</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section><section id="method.is_reduce-2" class="method trait-impl"><a class="src rightside" href="../../src/lalrpop_util/state_machine.rs.html#677">source</a><a href="#method.is_reduce-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.is_reduce" class="fn">is_reduce</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section><section id="method.is_error-2" class="method trait-impl"><a class="src rightside" href="../../src/lalrpop_util/state_machine.rs.html#677">source</a><a href="#method.is_error-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.is_error" class="fn">is_error</a>(self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.80.0/std/primitive.bool.html">bool</a></h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../trait.impl/lalrpop_util/state_machine/trait.ParserAction.js" data-ignore-extern-crates="std" async></script></section></div></main></body></html>