<h3id='tymethod.can_downcast'class='method'><spanid='can_downcast.v'class='invisible'><code>fn <ahref='#tymethod.can_downcast'class='fnname'>can_downcast</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></h3><divclass='docblock'><p>Checks if it'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><h3id='tymethod.downcast'class='method'><spanid='downcast.v'class='invisible'><code>fn <ahref='#tymethod.downcast'class='fnname'>downcast</a>(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="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>, </span></code></span></h3><divclass='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><h3id='tymethod.downcast_unchecked'class='method'><spanid='downcast_unchecked.v'class='invisible'><code>unsafe fn <ahref='#tymethod.downcast_unchecked'class='fnname'>downcast_unchecked</a>(self) -> T</code></span></h3><divclass='docblock'><p>Downcasts to <code>T</code> unconditionally.</p>
<p>Panics if compiled with <code>debug_assertions</code> and the instance doesn't implement <code>T</code>.</p>
</div></div>
<h2id='implementors'>Implementors</h2>
<ulclass='item-list'id='implementors-list'>
<li><code>impl<Super: <aclass="trait"href="../../glib/object/trait.IsA.html"title="trait glib::object::IsA">IsA</a><Super>, Sub: <aclass="trait"href="../../glib/object/trait.IsA.html"title="trait glib::object::IsA">IsA</a><Super>> Downcast<Sub> for Super</code></li>