}</pre><divclass='docblock'><p>Upcasting and downcasting support.</p>
<p>Provides conversions up and down the class hierarchy tree.</p>
</div>
<h2id='provided-methods'>Provided Methods</h2>
<divclass='methods'>
<h3id='method.upcast'class='method'><spanid='upcast.v'class='invisible'><code>fn <ahref='#method.upcast'class='fnname'>upcast</a><T>(self) -> T <spanclass="where fmt-newline">where<br> Self: <aclass="trait"href="../gtk/trait.IsA.html"title="trait gtk::IsA">IsA</a><T>,<br> T: <aclass="trait"href="../gtk/trait.StaticType.html"title="trait gtk::StaticType">StaticType</a> + <aclass="trait"href="../glib/wrapper/trait.UnsafeFrom.html"title="trait glib::wrapper::UnsafeFrom">UnsafeFrom</a><ObjectRef> + <aclass="trait"href="../glib/wrapper/trait.Wrapper.html"title="trait glib::wrapper::Wrapper">Wrapper</a>, </span></code></span></h3><divclass='docblock'><p>Upcasts an object to a superclass or interface <code>T</code>.</p>
</div><h3id='method.downcast'class='method'><spanid='downcast.v'class='invisible'><code>fn <ahref='#method.downcast'class='fnname'>downcast</a><T>(self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, Self><spanclass="where fmt-newline">where<br> Self: <aclass="trait"href="../glib/object/trait.Downcast.html"title="trait glib::object::Downcast">Downcast</a><T>, </span></code></span></h3><divclass='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>
</div><h3id='method.is'class='method'><spanid='is.v'class='invisible'><code>fn <ahref='#method.is'class='fnname'>is</a><T>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><spanclass="where fmt-newline">where<br> Self: <aclass="trait"href="../glib/object/trait.Downcast.html"title="trait glib::object::Downcast">Downcast</a><T>, </span></code></span></h3><divclass='docblock'><p>Returns <code>true</code> if the object is an instance of (can be downcast to) <code>T</code>.</p>
</div></div>
<h2id='implementors'>Implementors</h2>
<ulclass='item-list'id='implementors-list'>
<li><code>impl<T> Cast for T <spanclass="where fmt-newline">where<br> T: <aclass="trait"href="../gtk/trait.IsA.html"title="trait gtk::IsA">IsA</a><<aclass="struct"href="../gtk/struct.Object.html"title="struct gtk::Object">Object</a>>, </span></code></li>