This commit is contained in:
Travis CI User
2018-01-25 09:45:19 +00:00
commit 81208b2498
25123 changed files with 1422222 additions and 0 deletions

10
glib/object/Cast.t.html Normal file
View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=trait.Cast.html">
</head>
<body>
<p>Redirecting to <a href="trait.Cast.html">trait.Cast.html</a>...</p>
<script>location.replace("trait.Cast.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=trait.Downcast.html">
</head>
<body>
<p>Redirecting to <a href="trait.Downcast.html">trait.Downcast.html</a>...</p>
<script>location.replace("trait.Downcast.html" + location.search + location.hash);</script>
</body>
</html>

10
glib/object/IsA.t.html Normal file
View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=trait.IsA.html">
</head>
<body>
<p>Redirecting to <a href="trait.IsA.html">trait.IsA.html</a>...</p>
<script>location.replace("trait.IsA.html" + location.search + location.hash);</script>
</body>
</html>

10
glib/object/Object.t.html Normal file
View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=struct.Object.html">
</head>
<body>
<p>Redirecting to <a href="struct.Object.html">struct.Object.html</a>...</p>
<script>location.replace("struct.Object.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=trait.ObjectExt.html">
</head>
<body>
<p>Redirecting to <a href="trait.ObjectExt.html">trait.ObjectExt.html</a>...</p>
<script>location.replace("trait.ObjectExt.html" + location.search + location.hash);</script>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=struct.WeakRef.html">
</head>
<body>
<p>Redirecting to <a href="struct.WeakRef.html">struct.WeakRef.html</a>...</p>
<script>location.replace("struct.WeakRef.html" + location.search + location.hash);</script>
</body>
</html>

159
glib/object/index.html Normal file
View File

@@ -0,0 +1,159 @@
<!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 `object` mod in crate `glib`.">
<meta name="keywords" content="rust, rustlang, rust-lang, object">
<title>glib::object - Rust</title>
<link rel="stylesheet" type="text/css" href="../../normalize.css">
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
<link rel="stylesheet" type="text/css" href="../../main.css">
</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">
<p class='location'>Module object</p><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#traits">Traits</a></li></ul></div><p class='location'><a href='../index.html'>glib</a></p><script>window.sidebarCurrent = {name: 'object', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content">
<h1 class='fqn'><span class='in-band'>Module <a href='../index.html'>glib</a>::<wbr><a class="mod" href=''>object</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/glib/object.rs.html#5-816' title='goto source code'>[src]</a></span></h1>
<div class='docblock'><p><code>IMPL</code> Object wrapper implementation and <code>Object</code> binding.</p>
</div><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table>
<tr class=' module-item'>
<td><a class="struct" href="struct.Object.html"
title='struct glib::object::Object'>Object</a></td>
<td class='docblock-short'>
<p>The base class in the object hierarchy.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="struct" href="struct.WeakRef.html"
title='struct glib::object::WeakRef'>WeakRef</a></td>
<td class='docblock-short'>
</td>
</tr></table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
<table>
<tr class=' module-item'>
<td><a class="trait" href="trait.Cast.html"
title='trait glib::object::Cast'>Cast</a></td>
<td class='docblock-short'>
<p>Upcasting and downcasting support.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="trait" href="trait.Downcast.html"
title='trait glib::object::Downcast'>Downcast</a></td>
<td class='docblock-short'>
<p>Downcasts support.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="trait" href="trait.IsA.html"
title='trait glib::object::IsA'>IsA</a></td>
<td class='docblock-short'>
<p>Declares the &quot;is a&quot; relationship.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="trait" href="trait.ObjectExt.html"
title='trait glib::object::ObjectExt'>ObjectExt</a></td>
<td class='docblock-short'>
</td>
</tr></table></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt></dt>
<dd>Move up in search results</dd>
<dt></dt>
<dd>Move down in search results</dd>
<dt></dt>
<dd>Switch tab</dd>
<dt>&#9166;</dt>
<dd>Go to active search result</dd>
<dt style="width:31px;">+ / -</dt>
<dd>Collapse/expand all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../../";
window.currentCrate = "glib";
</script>
<script src="../../main.js"></script>
<script defer src="../../search-index.js"></script>
</body>
</html>

View File

@@ -0,0 +1 @@
initSidebarItems({"struct":[["Object","The base class in the object hierarchy."],["WeakRef",""]],"trait":[["Cast","Upcasting and downcasting support."],["Downcast","Downcasts support."],["IsA","Declares the \"is a\" relationship."],["ObjectExt",""]]});

View File

@@ -0,0 +1,141 @@
<!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 `Object` struct in crate `glib`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Object">
<title>glib::object::Object - Rust</title>
<link rel="stylesheet" type="text/css" href="../../normalize.css">
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
<link rel="stylesheet" type="text/css" href="../../main.css">
</head>
<body class="rustdoc struct">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<p class='location'>Struct Object</p><div class="block items"><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Hash">Hash</a><a href="#impl-StaticType">StaticType</a><a href="#impl-PartialEq%3CT%3E">PartialEq&lt;T&gt;</a><a href="#impl-Eq">Eq</a></div></div><p class='location'><a href='../index.html'>glib</a>::<wbr><a href='index.html'>object</a></p><script>window.sidebarCurrent = {name: 'Object', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content">
<h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>glib</a>::<wbr><a href='index.html'>object</a>::<wbr><a class="struct" href=''>Object</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/glib/object.rs.html#187' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct Object(_, _);</pre><div class='docblock'><p>The base class in the object hierarchy.</p>
</div>
<h2 id='implementations' class='small-section-header'>
Trait Implementations<a href='#implementations' class='anchor'></a>
</h2>
<h3 id='impl-Clone' class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../glib/object/struct.Object.html" title="struct glib::object::Object">Object</a></code><a href='#impl-Clone' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/glib/object.rs.html#186' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.clone' class="method"><span id='clone.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="struct" href="../../glib/object/struct.Object.html" title="struct glib::object::Object">Object</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/glib/object.rs.html#186' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class="method"><span id='clone_from.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#112-114' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id='impl-Debug' class='impl'><span class='in-band'><code>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="struct" href="../../glib/object/struct.Object.html" title="struct glib::object::Object">Object</a></code><a href='#impl-Debug' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/glib/object.rs.html#186' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, __arg_0: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/glib/object.rs.html#186' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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-Hash' class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> for <a class="struct" href="../../glib/object/struct.Object.html" title="struct glib::object::Object">Object</a></code><a href='#impl-Hash' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/glib/object.rs.html#186' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.hash' class="method"><span id='hash.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash' class='fnname'>hash</a>&lt;__H:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>&gt;(&amp;self, __arg_0: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>__H)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/glib/object.rs.html#186' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Feeds this value into the given [<code>Hasher</code>]. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#tymethod.hash">Read more</a></p>
</div><h4 id='method.hash_slice' class="method"><span id='hash_slice.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice' class='fnname'>hash_slice</a>&lt;H&gt;(data: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[Self]</a>, state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>H) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;H: <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hasher.html" title="trait core::hash::Hasher">Hasher</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.3.0'>1.3.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/hash/mod.rs.html#202-208' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Feeds a slice of this type into the given [<code>Hasher</code>]. <a href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html#method.hash_slice">Read more</a></p>
</div></div><h3 id='impl-StaticType' class='impl'><span class='in-band'><code>impl <a class="trait" href="../../glib/types/trait.StaticType.html" title="trait glib::types::StaticType">StaticType</a> for <a class="struct" href="../../glib/object/struct.Object.html" title="struct glib::object::Object">Object</a></code><a href='#impl-StaticType' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/glib/object.rs.html#419-423' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.static_type' class="method"><span id='static_type.v' class='invisible'><code>fn <a href='../../glib/types/trait.StaticType.html#tymethod.static_type' class='fnname'>static_type</a>() -&gt; <a class="enum" href="../../glib/types/enum.Type.html" title="enum glib::types::Type">Type</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/glib/object.rs.html#420-422' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the type identifier of <code>Self</code>.</p>
</div></div><h3 id='impl-PartialEq%3CT%3E' class='impl'><span class='in-band'><code>impl&lt;T:&nbsp;<a class="trait" href="../../glib/object/trait.IsA.html" title="trait glib::object::IsA">IsA</a>&lt;<a class="struct" href="../../glib/object/struct.Object.html" title="struct glib::object::Object">Object</a>&gt;&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;T&gt; for <a class="struct" href="../../glib/object/struct.Object.html" title="struct glib::object::Object">Object</a></code><a href='#impl-PartialEq%3CT%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/glib/object.rs.html#425-431' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.eq' class="method"><span id='eq.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/glib/object.rs.html#427-430' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><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"><span id='ne.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#121' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id='impl-Eq' class='impl'><span class='in-band'><code>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="struct" href="../../glib/object/struct.Object.html" title="struct glib::object::Object">Object</a></code><a href='#impl-Eq' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/glib/object.rs.html#455' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'></div></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt></dt>
<dd>Move up in search results</dd>
<dt></dt>
<dd>Move down in search results</dd>
<dt></dt>
<dd>Switch tab</dd>
<dt>&#9166;</dt>
<dd>Go to active search result</dd>
<dt style="width:31px;">+ / -</dt>
<dd>Collapse/expand all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../../";
window.currentCrate = "glib";
</script>
<script src="../../main.js"></script>
<script defer src="../../search-index.js"></script>
</body>
</html>

View File

@@ -0,0 +1,134 @@
<!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 `WeakRef` struct in crate `glib`.">
<meta name="keywords" content="rust, rustlang, rust-lang, WeakRef">
<title>glib::object::WeakRef - Rust</title>
<link rel="stylesheet" type="text/css" href="../../normalize.css">
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
<link rel="stylesheet" type="text/css" href="../../main.css">
</head>
<body class="rustdoc struct">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<p class='location'>Struct WeakRef</p><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.upgrade">upgrade</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Drop">Drop</a><a href="#impl-Clone">Clone</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a></div></div><p class='location'><a href='../index.html'>glib</a>::<wbr><a href='index.html'>object</a></p><script>window.sidebarCurrent = {name: 'WeakRef', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content">
<h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>glib</a>::<wbr><a href='index.html'>object</a>::<wbr><a class="struct" href=''>WeakRef</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/glib/object.rs.html#775' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct WeakRef&lt;T:&nbsp;<a class="trait" href="../../glib/object/trait.IsA.html" title="trait glib::object::IsA">IsA</a>&lt;<a class="struct" href="../../glib/object/struct.Object.html" title="struct glib::object::Object">Object</a>&gt; + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt;(_, _);</pre>
<h2 id='methods' class='small-section-header'>
Methods<a href='#methods' class='anchor'></a>
</h2>
<h3 id='impl' class='impl'><span class='in-band'><code>impl&lt;T:&nbsp;<a class="trait" href="../../glib/object/trait.IsA.html" title="trait glib::object::IsA">IsA</a>&lt;<a class="struct" href="../../glib/object/struct.Object.html" title="struct glib::object::Object">Object</a>&gt; + <a class="trait" href="../../glib/types/trait.StaticType.html" title="trait glib::types::StaticType">StaticType</a> + <a class="trait" href="../../glib/wrapper/trait.UnsafeFrom.html" title="trait glib::wrapper::UnsafeFrom">UnsafeFrom</a>&lt;ObjectRef&gt; + <a class="trait" href="../../glib/wrapper/trait.Wrapper.html" title="trait glib::wrapper::Wrapper">Wrapper</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt; <a class="struct" href="../../glib/object/struct.WeakRef.html" title="struct glib::object::WeakRef">WeakRef</a>&lt;T&gt;</code><a href='#impl' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/glib/object.rs.html#777-789' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.upgrade' class="method"><span id='upgrade.v' class='invisible'><code>pub fn <a href='#method.upgrade' class='fnname'>upgrade</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;T&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/glib/object.rs.html#778-788' title='goto source code'>[src]</a></span></h4>
</div>
<h2 id='implementations' class='small-section-header'>
Trait Implementations<a href='#implementations' class='anchor'></a>
</h2>
<h3 id='impl-Drop' class='impl'><span class='in-band'><code>impl&lt;T:&nbsp;<a class="trait" href="../../glib/object/trait.IsA.html" title="trait glib::object::IsA">IsA</a>&lt;<a class="struct" href="../../glib/object/struct.Object.html" title="struct glib::object::Object">Object</a>&gt; + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html" title="trait core::ops::drop::Drop">Drop</a> for <a class="struct" href="../../glib/object/struct.WeakRef.html" title="struct glib::object::WeakRef">WeakRef</a>&lt;T&gt;</code><a href='#impl-Drop' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/glib/object.rs.html#791-797' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.drop' class="method"><span id='drop.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop' class='fnname'>drop</a>(&amp;mut self)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/glib/object.rs.html#792-796' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Executes the destructor for this type. <a href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop">Read more</a></p>
</div></div><h3 id='impl-Clone' class='impl'><span class='in-band'><code>impl&lt;T:&nbsp;<a class="trait" href="../../glib/object/trait.IsA.html" title="trait glib::object::IsA">IsA</a>&lt;<a class="struct" href="../../glib/object/struct.Object.html" title="struct glib::object::Object">Object</a>&gt; + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../glib/object/struct.WeakRef.html" title="struct glib::object::WeakRef">WeakRef</a>&lt;T&gt;</code><a href='#impl-Clone' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/glib/object.rs.html#799-813' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.clone' class="method"><span id='clone.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/glib/object.rs.html#800-812' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class="method"><span id='clone_from.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#112-114' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id='impl-Send' class='impl'><span class='in-band'><code>impl&lt;T:&nbsp;<a class="trait" href="../../glib/object/trait.IsA.html" title="trait glib::object::IsA">IsA</a>&lt;<a class="struct" href="../../glib/object/struct.Object.html" title="struct glib::object::Object">Object</a>&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt; <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="struct" href="../../glib/object/struct.WeakRef.html" title="struct glib::object::WeakRef">WeakRef</a>&lt;T&gt;</code><a href='#impl-Send' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/glib/object.rs.html#815' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'></div><h3 id='impl-Sync' class='impl'><span class='in-band'><code>impl&lt;T:&nbsp;<a class="trait" href="../../glib/object/trait.IsA.html" title="trait glib::object::IsA">IsA</a>&lt;<a class="struct" href="../../glib/object/struct.Object.html" title="struct glib::object::Object">Object</a>&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>&gt; <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="struct" href="../../glib/object/struct.WeakRef.html" title="struct glib::object::WeakRef">WeakRef</a>&lt;T&gt;</code><a href='#impl-Sync' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/glib/object.rs.html#816' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'></div></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt></dt>
<dd>Move up in search results</dd>
<dt></dt>
<dd>Move down in search results</dd>
<dt></dt>
<dd>Switch tab</dd>
<dt>&#9166;</dt>
<dd>Go to active search result</dd>
<dt style="width:31px;">+ / -</dt>
<dd>Collapse/expand all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../../";
window.currentCrate = "glib";
</script>
<script src="../../main.js"></script>
<script defer src="../../search-index.js"></script>
</body>
</html>

183
glib/object/trait.Cast.html Normal file
View File

@@ -0,0 +1,183 @@
<!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 `Cast` trait in crate `glib`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Cast">
<title>glib::object::Cast - Rust</title>
<link rel="stylesheet" type="text/css" href="../../normalize.css">
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
<link rel="stylesheet" type="text/css" href="../../main.css">
</head>
<body class="rustdoc trait">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<p class='location'>Trait Cast</p><div class="block items"><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.upcast">upcast</a><a href="#method.downcast">downcast</a><a href="#method.is">is</a><a href="#method.dynamic_cast">dynamic_cast</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='../index.html'>glib</a>::<wbr><a href='index.html'>object</a></p><script>window.sidebarCurrent = {name: 'Cast', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content">
<h1 class='fqn'><span class='in-band'>Trait <a href='../index.html'>glib</a>::<wbr><a href='index.html'>object</a>::<wbr><a class="trait" href=''>Cast</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/glib/object.rs.html#25-103' title='goto source code'>[src]</a></span></h1>
<pre class='rust trait'>pub trait Cast: <a class="trait" href="../../glib/object/trait.IsA.html" title="trait glib::object::IsA">IsA</a>&lt;<a class="struct" href="../../glib/object/struct.Object.html" title="struct glib::object::Object">Object</a>&gt; {
fn <a href='#method.upcast' class='fnname'>upcast</a>&lt;T&gt;(self) -&gt; T<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../glib/types/trait.StaticType.html" title="trait glib::types::StaticType">StaticType</a> + <a class="trait" href="../../glib/wrapper/trait.UnsafeFrom.html" title="trait glib::wrapper::UnsafeFrom">UnsafeFrom</a>&lt;ObjectRef&gt; + <a class="trait" href="../../glib/wrapper/trait.Wrapper.html" title="trait glib::wrapper::Wrapper">Wrapper</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../glib/object/trait.IsA.html" title="trait glib::object::IsA">IsA</a>&lt;T&gt;</span>,
{ ... }
<div class='item-spacer'></div> fn <a href='#method.downcast' class='fnname'>downcast</a>&lt;T&gt;(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, Self&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="../../glib/object/trait.Downcast.html" title="trait glib::object::Downcast">Downcast</a>&lt;T&gt;</span>,
{ ... }
<div class='item-spacer'></div> fn <a href='#method.is' class='fnname'>is</a>&lt;T&gt;(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../glib/types/trait.StaticType.html" title="trait glib::types::StaticType">StaticType</a></span>,
{ ... }
<div class='item-spacer'></div> fn <a href='#method.dynamic_cast' class='fnname'>dynamic_cast</a>&lt;T&gt;(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, Self&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../glib/types/trait.StaticType.html" title="trait glib::types::StaticType">StaticType</a> + <a class="trait" href="../../glib/wrapper/trait.UnsafeFrom.html" title="trait glib::wrapper::UnsafeFrom">UnsafeFrom</a>&lt;ObjectRef&gt; + <a class="trait" href="../../glib/wrapper/trait.Wrapper.html" title="trait glib::wrapper::Wrapper">Wrapper</a></span>,
{ ... }
}</pre><div class='docblock'><p>Upcasting and downcasting support.</p>
<p>Provides conversions up and down the class hierarchy tree.</p>
</div>
<h2 id='provided-methods' class='small-section-header'>
Provided Methods<a href='#provided-methods' class='anchor'></a>
</h2>
<div class='methods'>
<h3 id='method.upcast' class='method'><span id='upcast.v' class='invisible'><code>fn <a href='#method.upcast' class='fnname'>upcast</a>&lt;T&gt;(self) -&gt; T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../glib/types/trait.StaticType.html" title="trait glib::types::StaticType">StaticType</a> + <a class="trait" href="../../glib/wrapper/trait.UnsafeFrom.html" title="trait glib::wrapper::UnsafeFrom">UnsafeFrom</a>&lt;ObjectRef&gt; + <a class="trait" href="../../glib/wrapper/trait.Wrapper.html" title="trait glib::wrapper::Wrapper">Wrapper</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="../../glib/object/trait.IsA.html" title="trait glib::object::IsA">IsA</a>&lt;T&gt;,&nbsp;</span></code></span></h3><div class='docblock'><p>Upcasts an object to a superclass or interface <code>T</code>.</p>
<p><em>NOTE</em>: This statically checks at compile-time if casting is possible. It is not always
known at compile-time, whether a specific object implements an interface or not, in which case
<code>upcast</code> would fail to compile. <code>dynamic_cast</code> can be used in these circumstances, which
is checking the types at runtime.</p>
<h1 id='example' class='section-header'><a href='#example'>Example</a></h1>
<div class='information'><div class='tooltip ignore'><span class='tooltiptext'>This example is not tested</span></div></div><pre class="rust rust-example-rendered ignore">
<span class="kw">let</span> <span class="ident">button</span> <span class="op">=</span> <span class="ident">gtk</span>::<span class="ident">Button</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="ident">widget</span> <span class="op">=</span> <span class="ident">button</span>.<span class="ident">upcast</span>::<span class="op">&lt;</span><span class="ident">gtk</span>::<span class="ident">Widget</span><span class="op">&gt;</span>();</pre>
</div><h3 id='method.downcast' class='method'><span id='downcast.v' class='invisible'><code>fn <a href='#method.downcast' class='fnname'>downcast</a>&lt;T&gt;(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="../../glib/object/trait.Downcast.html" title="trait glib::object::Downcast">Downcast</a>&lt;T&gt;,&nbsp;</span></code></span></h3><div class='docblock'><p>Tries to downcast to a subclass or interface implementor <code>T</code>.</p>
<p>Returns <code>Ok(T)</code> if the object is an instance of <code>T</code> and <code>Err(self)</code>
otherwise.</p>
<p><em>NOTE</em>: This statically checks at compile-time if casting is possible. It is not always
known at compile-time, whether a specific object implements an interface or not, in which case
<code>upcast</code> would fail to compile. <code>dynamic_cast</code> can be used in these circumstances, which
is checking the types at runtime.</p>
<h1 id='example-1' class='section-header'><a href='#example-1'>Example</a></h1>
<div class='information'><div class='tooltip ignore'><span class='tooltiptext'>This example is not tested</span></div></div><pre class="rust rust-example-rendered ignore">
<span class="kw">let</span> <span class="ident">button</span> <span class="op">=</span> <span class="ident">gtk</span>::<span class="ident">Button</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="ident">widget</span> <span class="op">=</span> <span class="ident">button</span>.<span class="ident">upcast</span>::<span class="op">&lt;</span><span class="ident">gtk</span>::<span class="ident">Widget</span><span class="op">&gt;</span>();
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">widget</span>.<span class="ident">downcast</span>::<span class="op">&lt;</span><span class="ident">gtk</span>::<span class="ident">Button</span><span class="op">&gt;</span>().<span class="ident">is_ok</span>());</pre>
</div><h3 id='method.is' class='method'><span id='is.v' class='invisible'><code>fn <a href='#method.is' class='fnname'>is</a>&lt;T&gt;(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../glib/types/trait.StaticType.html" title="trait glib::types::StaticType">StaticType</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Returns <code>true</code> if the object is an instance of (can be cast to) <code>T</code>.</p>
</div><h3 id='method.dynamic_cast' class='method'><span id='dynamic_cast.v' class='invisible'><code>fn <a href='#method.dynamic_cast' class='fnname'>dynamic_cast</a>&lt;T&gt;(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../glib/types/trait.StaticType.html" title="trait glib::types::StaticType">StaticType</a> + <a class="trait" href="../../glib/wrapper/trait.UnsafeFrom.html" title="trait glib::wrapper::UnsafeFrom">UnsafeFrom</a>&lt;ObjectRef&gt; + <a class="trait" href="../../glib/wrapper/trait.Wrapper.html" title="trait glib::wrapper::Wrapper">Wrapper</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Tries to cast to an object of type <code>T</code>. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while <code>downcast</code> and <code>upcast</code> will do many checks at compile-time already.</p>
<p>It is not always known at compile-time, whether a specific object implements an interface or
not, and checking as to be performed at runtime.</p>
<p>Returns <code>Ok(T)</code> if the object is an instance of <code>T</code> and <code>Err(self)</code>
otherwise.</p>
<h1 id='example-2' class='section-header'><a href='#example-2'>Example</a></h1>
<div class='information'><div class='tooltip ignore'><span class='tooltiptext'>This example is not tested</span></div></div><pre class="rust rust-example-rendered ignore">
<span class="kw">let</span> <span class="ident">button</span> <span class="op">=</span> <span class="ident">gtk</span>::<span class="ident">Button</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="ident">widget</span> <span class="op">=</span> <span class="ident">button</span>.<span class="ident">dynamic_cast</span>::<span class="op">&lt;</span><span class="ident">gtk</span>::<span class="ident">Widget</span><span class="op">&gt;</span>();
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">widget</span>.<span class="ident">is_ok</span>);
<span class="kw">let</span> <span class="ident">widget</span> <span class="op">=</span> <span class="ident">widget</span>.<span class="ident">unwrap</span>();
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">widget</span>.<span class="ident">dynamic_cast</span>::<span class="op">&lt;</span><span class="ident">gtk</span>::<span class="ident">Button</span><span class="op">&gt;</span>().<span class="ident">is_ok</span>());</pre>
</div></div>
<h2 id='implementors' class='small-section-header'>
Implementors<a href='#implementors' class='anchor'></a>
</h2>
<ul class='item-list' id='implementors-list'>
<li><code>impl&lt;T:&nbsp;<a class="trait" href="../../glib/object/trait.IsA.html" title="trait glib::object::IsA">IsA</a>&lt;<a class="struct" href="../../glib/object/struct.Object.html" title="struct glib::object::Object">Object</a>&gt;&gt; Cast for T</code></li>
</ul><script type="text/javascript" async
src="../../implementors/glib/object/trait.Cast.js">
</script></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt></dt>
<dd>Move up in search results</dd>
<dt></dt>
<dd>Move down in search results</dd>
<dt></dt>
<dd>Switch tab</dd>
<dt>&#9166;</dt>
<dd>Go to active search result</dd>
<dt style="width:31px;">+ / -</dt>
<dd>Collapse/expand all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../../";
window.currentCrate = "glib";
</script>
<script src="../../main.js"></script>
<script defer src="../../search-index.js"></script>
</body>
</html>

View File

@@ -0,0 +1,141 @@
<!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 `Downcast` trait in crate `glib`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Downcast">
<title>glib::object::Downcast - Rust</title>
<link rel="stylesheet" type="text/css" href="../../normalize.css">
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
<link rel="stylesheet" type="text/css" href="../../main.css">
</head>
<body class="rustdoc trait">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<p class='location'>Trait Downcast</p><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.can_downcast">can_downcast</a><a href="#tymethod.downcast">downcast</a><a href="#tymethod.downcast_unchecked">downcast_unchecked</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='../index.html'>glib</a>::<wbr><a href='index.html'>object</a></p><script>window.sidebarCurrent = {name: 'Downcast', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content">
<h1 class='fqn'><span class='in-band'>Trait <a href='../index.html'>glib</a>::<wbr><a href='index.html'>object</a>::<wbr><a class="trait" href=''>Downcast</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/glib/object.rs.html#129-142' title='goto source code'>[src]</a></span></h1>
<pre class='rust trait'>pub trait Downcast&lt;T&gt; {
fn <a href='#tymethod.can_downcast' class='fnname'>can_downcast</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>;
<div class='item-spacer'></div> fn <a href='#tymethod.downcast' class='fnname'>downcast</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, Self&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>;
<div class='item-spacer'></div> unsafe fn <a href='#tymethod.downcast_unchecked' class='fnname'>downcast_unchecked</a>(self) -&gt; T;
}</pre><div class='docblock'><p>Downcasts support.</p>
</div>
<h2 id='required-methods' class='small-section-header'>
Required Methods<a href='#required-methods' class='anchor'></a>
</h2>
<div class='methods'>
<h3 id='tymethod.can_downcast' class='method'><span id='can_downcast.v' class='invisible'><code>fn <a href='#tymethod.can_downcast' class='fnname'>can_downcast</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></h3><div class='docblock'><p>Checks if it&#39;s possible to downcast to <code>T</code>.</p>
<p>Returns <code>true</code> if the instance implements <code>T</code> and <code>false</code> otherwise.</p>
</div><h3 id='tymethod.downcast' class='method'><span id='downcast.v' class='invisible'><code>fn <a href='#tymethod.downcast' class='fnname'>downcast</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code></span></h3><div class='docblock'><p>Tries to downcast to <code>T</code>.</p>
<p>Returns <code>Ok(T)</code> if the instance implements <code>T</code> and <code>Err(Self)</code> otherwise.</p>
</div><h3 id='tymethod.downcast_unchecked' class='method'><span id='downcast_unchecked.v' class='invisible'><code>unsafe fn <a href='#tymethod.downcast_unchecked' class='fnname'>downcast_unchecked</a>(self) -&gt; T</code></span></h3><div class='docblock'><p>Downcasts to <code>T</code> unconditionally.</p>
<p>Panics if compiled with <code>debug_assertions</code> and the instance doesn&#39;t implement <code>T</code>.</p>
</div></div>
<h2 id='implementors' class='small-section-header'>
Implementors<a href='#implementors' class='anchor'></a>
</h2>
<ul class='item-list' id='implementors-list'>
<li><code>impl&lt;Super:&nbsp;<a class="trait" href="../../glib/object/trait.IsA.html" title="trait glib::object::IsA">IsA</a>&lt;Super&gt;, Sub:&nbsp;<a class="trait" href="../../glib/object/trait.IsA.html" title="trait glib::object::IsA">IsA</a>&lt;Super&gt;&gt; Downcast&lt;Sub&gt; for Super</code></li>
</ul><script type="text/javascript" async
src="../../implementors/glib/object/trait.Downcast.js">
</script></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt></dt>
<dd>Move up in search results</dd>
<dt></dt>
<dd>Move down in search results</dd>
<dt></dt>
<dd>Switch tab</dd>
<dt>&#9166;</dt>
<dd>Go to active search result</dd>
<dt style="width:31px;">+ / -</dt>
<dd>Collapse/expand all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../../";
window.currentCrate = "glib";
</script>
<script src="../../main.js"></script>
<script defer src="../../search-index.js"></script>
</body>
</html>

134
glib/object/trait.IsA.html Normal file
View File

@@ -0,0 +1,134 @@
<!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 `IsA` trait in crate `glib`.">
<meta name="keywords" content="rust, rustlang, rust-lang, IsA">
<title>glib::object::IsA - Rust</title>
<link rel="stylesheet" type="text/css" href="../../normalize.css">
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
<link rel="stylesheet" type="text/css" href="../../main.css">
</head>
<body class="rustdoc trait">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<p class='location'>Trait IsA</p><div class="block items"><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='../index.html'>glib</a>::<wbr><a href='index.html'>object</a></p><script>window.sidebarCurrent = {name: 'IsA', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content">
<h1 class='fqn'><span class='in-band'>Trait <a href='../index.html'>glib</a>::<wbr><a href='index.html'>object</a>::<wbr><a class="trait" href=''>IsA</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/glib/object.rs.html#120-122' title='goto source code'>[src]</a></span></h1>
<pre class='rust trait'>pub trait IsA&lt;T:&nbsp;<a class="trait" href="../../glib/types/trait.StaticType.html" title="trait glib::types::StaticType">StaticType</a> + <a class="trait" href="../../glib/wrapper/trait.UnsafeFrom.html" title="trait glib::wrapper::UnsafeFrom">UnsafeFrom</a>&lt;ObjectRef&gt; + <a class="trait" href="../../glib/wrapper/trait.Wrapper.html" title="trait glib::wrapper::Wrapper">Wrapper</a>&gt;: <a class="trait" href="../../glib/types/trait.StaticType.html" title="trait glib::types::StaticType">StaticType</a> + <a class="trait" href="../../glib/wrapper/trait.Wrapper.html" title="trait glib::wrapper::Wrapper">Wrapper</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;ObjectRef&gt; + <a class="trait" href="../../glib/wrapper/trait.UnsafeFrom.html" title="trait glib::wrapper::UnsafeFrom">UnsafeFrom</a>&lt;ObjectRef&gt; + for&lt;'a&gt; <a class="trait" href="../../glib/translate/trait.ToGlibPtr.html" title="trait glib::translate::ToGlibPtr">ToGlibPtr</a>&lt;'a, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a>&lt;T as <a class="trait" href="../../glib/wrapper/trait.Wrapper.html" title="trait glib::wrapper::Wrapper">Wrapper</a>&gt;::<a class="type" href="../../glib/wrapper/trait.Wrapper.html#associatedtype.GlibType" title="type glib::wrapper::Wrapper::GlibType">GlibType</a>&gt; { }</pre><div class='docblock'><p>Declares the &quot;is a&quot; relationship.</p>
<p><code>Self</code> is said to implement <code>T</code>.</p>
<p>For instance, since originally <code>GtkWidget</code> is a subclass of <code>GObject</code> and
implements the <code>GtkBuildable</code> interface, <code>gtk::Widget</code> implements
<code>IsA&lt;glib::Object&gt;</code> and <code>IsA&lt;gtk::Buildable&gt;</code>.</p>
<p>The trait can only be implemented if the appropriate <code>ToGlibPtr</code>
implementations exist.</p>
<p><code>T</code> always implements <code>IsA&lt;T&gt;</code>.</p>
</div>
<h2 id='implementors' class='small-section-header'>
Implementors<a href='#implementors' class='anchor'></a>
</h2>
<ul class='item-list' id='implementors-list'>
<li><code>impl&lt;T&gt; IsA&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../glib/types/trait.StaticType.html" title="trait glib::types::StaticType">StaticType</a> + <a class="trait" href="../../glib/wrapper/trait.Wrapper.html" title="trait glib::wrapper::Wrapper">Wrapper</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;ObjectRef&gt; + <a class="trait" href="../../glib/wrapper/trait.UnsafeFrom.html" title="trait glib::wrapper::UnsafeFrom">UnsafeFrom</a>&lt;ObjectRef&gt; + for&lt;'a&gt; <a class="trait" href="../../glib/translate/trait.ToGlibPtr.html" title="trait glib::translate::ToGlibPtr">ToGlibPtr</a>&lt;'a, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a>&lt;T as <a class="trait" href="../../glib/wrapper/trait.Wrapper.html" title="trait glib::wrapper::Wrapper">Wrapper</a>&gt;::<a class="type" href="../../glib/wrapper/trait.Wrapper.html#associatedtype.GlibType" title="type glib::wrapper::Wrapper::GlibType">GlibType</a>&gt;,&nbsp;</span></code></li>
</ul><script type="text/javascript" async
src="../../implementors/glib/object/trait.IsA.js">
</script></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt></dt>
<dd>Move up in search results</dd>
<dt></dt>
<dd>Move down in search results</dd>
<dt></dt>
<dd>Switch tab</dd>
<dt>&#9166;</dt>
<dd>Go to active search result</dd>
<dt style="width:31px;">+ / -</dt>
<dd>Collapse/expand all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../../";
window.currentCrate = "glib";
</script>
<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