Files
google_speech_rs/docs/pyo3/prelude/index.html
T
2021-06-02 05:29:43 +00:00

27 lines
9.1 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="A collection of items you most likely want to have in scope when working with pyo3"><meta name="keywords" content="rust, rustlang, rust-lang, prelude"><title>pyo3::prelude - 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><script src="../../crates.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" role="button">&#9776;</div><a href='../../pyo3/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module prelude</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#structs">Structs</a></li><li><a href="#types">Type Definitions</a></li></ul></div><p class="location"><a href="../index.html">pyo3</a></p><div id="sidebar-vars" data-name="prelude" 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" height="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" height="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">pyo3</a>::<wbr><a class="mod" href="">prelude</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">&#x2212;</span>]</a></span><a class="srclink" href="../../src/pyo3/prelude.rs.html#3-23" title="goto source code">[src]</a></span></h1><div class="docblock"><p>A collection of items you most likely want to have in scope when working with pyo3</p>
<p>The purpose of this module is to alleviate imports of many common pyo3 traits
by adding a glob import to the top of pyo3 heavy modules:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">pyo3</span>::<span class="ident">prelude</span>::<span class="kw-2">*</span>;</pre></div>
</div><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
<table><tr><td><code>pub use crate::pycell::<a class="struct" href="../../pyo3/pycell/struct.PyCell.html" title="struct pyo3::pycell::PyCell">PyCell</a>;</code></td></tr><tr><td><code>pub use crate::pycell::<a class="struct" href="../../pyo3/pycell/struct.PyRef.html" title="struct pyo3::pycell::PyRef">PyRef</a>;</code></td></tr><tr><td><code>pub use crate::pycell::<a class="struct" href="../../pyo3/pycell/struct.PyRefMut.html" title="struct pyo3::pycell::PyRefMut">PyRefMut</a>;</code></td></tr><tr><td><code>pub use crate::pyclass_init::<a class="struct" href="../../pyo3/pyclass_init/struct.PyClassInitializer.html" title="struct pyo3::pyclass_init::PyClassInitializer">PyClassInitializer</a>;</code></td></tr><tr><td><code>pub use crate::<a class="trait" href="../../pyo3/conversion/trait.FromPyObject.html" title="trait pyo3::conversion::FromPyObject">FromPyObject</a>;</code></td></tr><tr><td><code>pub use crate::<a class="trait" href="../../pyo3/conversion/trait.IntoPy.html" title="trait pyo3::conversion::IntoPy">IntoPy</a>;</code></td></tr><tr><td><code>pub use crate::<a class="trait" href="../../pyo3/conversion/trait.IntoPyPointer.html" title="trait pyo3::conversion::IntoPyPointer">IntoPyPointer</a>;</code></td></tr><tr><td><code>pub use crate::<a class="trait" href="../../pyo3/conversion/trait.PyTryFrom.html" title="trait pyo3::conversion::PyTryFrom">PyTryFrom</a>;</code></td></tr><tr><td><code>pub use crate::<a class="trait" href="../../pyo3/conversion/trait.PyTryInto.html" title="trait pyo3::conversion::PyTryInto">PyTryInto</a>;</code></td></tr><tr><td><code>pub use crate::<a class="trait" href="../../pyo3/conversion/trait.ToPyObject.html" title="trait pyo3::conversion::ToPyObject">ToPyObject</a>;</code></td></tr></table><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.GILGuard.html" title="pyo3::prelude::GILGuard struct">GILGuard</a></td><td class="docblock-short"><p>RAII type that represents the Global Interpreter Lock acquisition. To get hold of a value of
this type, see <a href="struct.Python.html#method.acquire_gil"><code>Python::acquire_gil</code></a>.</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Py.html" title="pyo3::prelude::Py struct">Py</a></td><td class="docblock-short"><p>A Python object of known type T.</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.PyAny.html" title="pyo3::prelude::PyAny struct">PyAny</a></td><td class="docblock-short"><p>A Python object with GIL lifetime</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.PyErr.html" title="pyo3::prelude::PyErr struct">PyErr</a></td><td class="docblock-short"><p>Represents a Python exception that was raised.</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.PyModule.html" title="pyo3::prelude::PyModule struct">PyModule</a></td><td class="docblock-short"><p>Represents a Python <code>module</code> object.</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.Python.html" title="pyo3::prelude::Python struct">Python</a></td><td class="docblock-short"><p>Marker type that indicates that the GIL is currently held.</p>
</td></tr></table><h2 id="types" class="section-header"><a href="#types">Type Definitions</a></h2>
<table><tr class="module-item"><td><a class="type" href="type.PyObject.html" title="pyo3::prelude::PyObject type">PyObject</a></td><td class="docblock-short"><p>A commonly-used alias for <code>Py&lt;PyAny&gt;</code>.</p>
</td></tr><tr class="module-item"><td><a class="type" href="type.PyResult.html" title="pyo3::prelude::PyResult type">PyResult</a></td><td class="docblock-short"><p>Represents the result of a Python call.</p>
</td></tr></table><h2 id="attributes" class="section-header"><a href="#attributes">Attribute Macros</a></h2>
<table><tr class="module-item"><td><a class="attr" href="attr.pyclass.html" title="pyo3::prelude::pyclass attr">pyclass</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="attr" href="attr.pyfunction.html" title="pyo3::prelude::pyfunction attr">pyfunction</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="attr" href="attr.pymethods.html" title="pyo3::prelude::pymethods attr">pymethods</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="attr" href="attr.pymodule.html" title="pyo3::prelude::pymodule attr">pymodule</a></td><td class="docblock-short"><p>Internally, this proc macro create a new c function called <code>PyInit_{my_module}</code>
that then calls the init function you provided</p>
</td></tr><tr class="module-item"><td><a class="attr" href="attr.pyproto.html" title="pyo3::prelude::pyproto attr">pyproto</a></td><td class="docblock-short"></td></tr></table><h2 id="derives" class="section-header"><a href="#derives">Derive Macros</a></h2>
<table><tr class="module-item"><td><a class="derive" href="derive.FromPyObject.html" title="pyo3::prelude::FromPyObject derive">FromPyObject</a></td><td class="docblock-short"></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="pyo3" data-search-js="../../search-index.js"></div>
<script src="../../main.js"></script></body></html>