|
|
<!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 `Window` struct in crate `winit`."><meta name="keywords" content="rust, rustlang, rust-lang, Window"><title>winit::Window - 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="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></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"><div class="sidebar-menu">☰</div><a href='../winit/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct Window</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.get_available_monitors">get_available_monitors</a><a href="#method.get_current_monitor">get_current_monitor</a><a href="#method.get_hidpi_factor">get_hidpi_factor</a><a href="#method.get_inner_position">get_inner_position</a><a href="#method.get_inner_size">get_inner_size</a><a href="#method.get_outer_size">get_outer_size</a><a href="#method.get_position">get_position</a><a href="#method.get_primary_monitor">get_primary_monitor</a><a href="#method.grab_cursor">grab_cursor</a><a href="#method.hide">hide</a><a href="#method.hide_cursor">hide_cursor</a><a href="#method.id">id</a><a href="#method.new">new</a><a href="#method.set_always_on_top">set_always_on_top</a><a href="#method.set_cursor">set_cursor</a><a href="#method.set_cursor_position">set_cursor_position</a><a href="#method.set_decorations">set_decorations</a><a href="#method.set_fullscreen">set_fullscreen</a><a href="#method.set_ime_spot">set_ime_spot</a><a href="#method.set_inner_size">set_inner_size</a><a href="#method.set_max_dimensions">set_max_dimensions</a><a href="#method.set_maximized">set_maximized</a><a href="#method.set_min_dimensions">set_min_dimensions</a><a href="#method.set_position">set_position</a><a href="#method.set_resizable">set_resizable</a><a href="#method.set_title">set_title</a><a href="#method.set_window_icon">set_window_icon</a><a href="#method.show">show</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-WindowExt">WindowExt</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-Erased">Erased</a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><p class='location'><a href='index.html'>winit</a></p><script>window.sidebarCurrent = {name: 'Window', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><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'>−</span>]</a></span><a class='srclink' href='../src/winit/lib.rs.html#156-158' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>winit</a>::<wbr><a class="struct" href=''>Window</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct Window { /* fields omitted */ }</pre></div><div class='docblock'><p>Represents a window.</p>
|
|
|
<h1 id="example" class="section-header"><a href="#example">Example</a></h1>
|
|
|
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
|
|
<span class="kw">use</span> <span class="ident">winit</span>::{<span class="ident">Event</span>, <span class="ident">EventsLoop</span>, <span class="ident">Window</span>, <span class="ident">WindowEvent</span>, <span class="ident">ControlFlow</span>};
|
|
|
|
|
|
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">events_loop</span> <span class="op">=</span> <span class="ident">EventsLoop</span>::<span class="ident">new</span>();
|
|
|
<span class="kw">let</span> <span class="ident">window</span> <span class="op">=</span> <span class="ident">Window</span>::<span class="ident">new</span>(<span class="kw-2">&</span><span class="ident">events_loop</span>).<span class="ident">unwrap</span>();
|
|
|
|
|
|
<span class="ident">events_loop</span>.<span class="ident">run_forever</span>(<span class="op">|</span><span class="ident">event</span><span class="op">|</span> {
|
|
|
<span class="kw">match</span> <span class="ident">event</span> {
|
|
|
<span class="ident">Event</span>::<span class="ident">WindowEvent</span> { <span class="ident">event</span>: <span class="ident">WindowEvent</span>::<span class="ident">CloseRequested</span>, .. } <span class="op">=</span><span class="op">></span> {
|
|
|
<span class="ident">ControlFlow</span>::<span class="ident">Break</span>
|
|
|
},
|
|
|
<span class="kw">_</span> <span class="op">=</span><span class="op">></span> <span class="ident">ControlFlow</span>::<span class="ident">Continue</span>,
|
|
|
}
|
|
|
});</pre></div>
|
|
|
</div><h2 id='methods' class='small-section-header'>Methods<a href='#methods' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../winit/struct.Window.html" title="struct winit::Window">Window</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/winit/window.rs.html#165-430' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.new' class="method"><code id='new.v'>pub fn <a href='#method.new' class='fnname'>new</a>(events_loop: &<a class="struct" href="../winit/struct.EventsLoop.html" title="struct winit::EventsLoop">EventsLoop</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="../winit/struct.Window.html" title="struct winit::Window">Window</a>, <a class="enum" href="../winit/enum.CreationError.html" title="enum winit::CreationError">CreationError</a>></code><a class='srclink' href='../src/winit/window.rs.html#173-176' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a new Window for platforms where this is appropriate.</p>
|
|
|
<p>This function is equivalent to <code>WindowBuilder::new().build(events_loop)</code>.</p>
|
|
|
<p>Error should be very rare and only occur in case of permission denied, incompatible system,
|
|
|
out of memory, etc.</p>
|
|
|
</div><h4 id='method.set_title' class="method"><code id='set_title.v'>pub fn <a href='#method.set_title' class='fnname'>set_title</a>(&self, title: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>)</code><a class='srclink' href='../src/winit/window.rs.html#182-184' title='goto source code'>[src]</a></h4><div class='docblock'><p>Modifies the title of the window.</p>
|
|
|
<p>This is a no-op if the window has already been closed.</p>
|
|
|
</div><h4 id='method.show' class="method"><code id='show.v'>pub fn <a href='#method.show' class='fnname'>show</a>(&self)</code><a class='srclink' href='../src/winit/window.rs.html#193-195' title='goto source code'>[src]</a></h4><div class='docblock'><p>Shows the window if it was hidden.</p>
|
|
|
<h2 id="platform-specific" class="section-header"><a href="#platform-specific">Platform-specific</a></h2>
|
|
|
<ul>
|
|
|
<li>Has no effect on Android</li>
|
|
|
</ul>
|
|
|
</div><h4 id='method.hide' class="method"><code id='hide.v'>pub fn <a href='#method.hide' class='fnname'>hide</a>(&self)</code><a class='srclink' href='../src/winit/window.rs.html#204-206' title='goto source code'>[src]</a></h4><div class='docblock'><p>Hides the window if it was visible.</p>
|
|
|
<h2 id="platform-specific-1" class="section-header"><a href="#platform-specific-1">Platform-specific</a></h2>
|
|
|
<ul>
|
|
|
<li>Has no effect on Android</li>
|
|
|
</ul>
|
|
|
</div><h4 id='method.get_position' class="method"><code id='get_position.v'>pub fn <a href='#method.get_position' class='fnname'>get_position</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../winit/dpi/struct.LogicalPosition.html" title="struct winit::dpi::LogicalPosition">LogicalPosition</a>></code><a class='srclink' href='../src/winit/window.rs.html#220-222' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the position of the top-left hand corner of the window relative to the
|
|
|
top-left hand corner of the desktop.</p>
|
|
|
<p>Note that the top-left hand corner of the desktop is not necessarily the same as
|
|
|
the screen. If the user uses a desktop with multiple monitors, the top-left hand corner
|
|
|
of the desktop is the top-left hand corner of the monitor at the top-left of the desktop.</p>
|
|
|
<p>The coordinates can be negative if the top-left hand corner of the window is outside
|
|
|
of the visible screen region.</p>
|
|
|
<p>Returns <code>None</code> if the window no longer exists.</p>
|
|
|
</div><h4 id='method.get_inner_position' class="method"><code id='get_inner_position.v'>pub fn <a href='#method.get_inner_position' class='fnname'>get_inner_position</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../winit/dpi/struct.LogicalPosition.html" title="struct winit::dpi::LogicalPosition">LogicalPosition</a>></code><a class='srclink' href='../src/winit/window.rs.html#229-231' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the position of the top-left hand corner of the window's client area relative to the
|
|
|
top-left hand corner of the desktop.</p>
|
|
|
<p>The same conditions that apply to <code>get_position</code> apply to this method.</p>
|
|
|
</div><h4 id='method.set_position' class="method"><code id='set_position.v'>pub fn <a href='#method.set_position' class='fnname'>set_position</a>(&self, position: <a class="struct" href="../winit/dpi/struct.LogicalPosition.html" title="struct winit::dpi::LogicalPosition">LogicalPosition</a>)</code><a class='srclink' href='../src/winit/window.rs.html#239-241' title='goto source code'>[src]</a></h4><div class='docblock'><p>Modifies the position of the window.</p>
|
|
|
<p>See <code>get_position</code> for more information about the coordinates.</p>
|
|
|
<p>This is a no-op if the window has already been closed.</p>
|
|
|
</div><h4 id='method.get_inner_size' class="method"><code id='get_inner_size.v'>pub fn <a href='#method.get_inner_size' class='fnname'>get_inner_size</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../winit/dpi/struct.LogicalSize.html" title="struct winit::dpi::LogicalSize">LogicalSize</a>></code><a class='srclink' href='../src/winit/window.rs.html#251-253' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the logical size of the window's client area.</p>
|
|
|
<p>The client area is the content of the window, excluding the title bar and borders.</p>
|
|
|
<p>Converting the returned <code>LogicalSize</code> to <code>PhysicalSize</code> produces the size your framebuffer should be.</p>
|
|
|
<p>Returns <code>None</code> if the window no longer exists.</p>
|
|
|
</div><h4 id='method.get_outer_size' class="method"><code id='get_outer_size.v'>pub fn <a href='#method.get_outer_size' class='fnname'>get_outer_size</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../winit/dpi/struct.LogicalSize.html" title="struct winit::dpi::LogicalSize">LogicalSize</a>></code><a class='srclink' href='../src/winit/window.rs.html#262-264' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the logical size of the entire window.</p>
|
|
|
<p>These dimensions include the title bar and borders. If you don't want that (and you usually don't),
|
|
|
use <code>get_inner_size</code> instead.</p>
|
|
|
<p>Returns <code>None</code> if the window no longer exists.</p>
|
|
|
</div><h4 id='method.set_inner_size' class="method"><code id='set_inner_size.v'>pub fn <a href='#method.set_inner_size' class='fnname'>set_inner_size</a>(&self, size: <a class="struct" href="../winit/dpi/struct.LogicalSize.html" title="struct winit::dpi::LogicalSize">LogicalSize</a>)</code><a class='srclink' href='../src/winit/window.rs.html#272-274' title='goto source code'>[src]</a></h4><div class='docblock'><p>Modifies the inner size of the window.</p>
|
|
|
<p>See <code>get_inner_size</code> for more information about the values.</p>
|
|
|
<p>This is a no-op if the window has already been closed.</p>
|
|
|
</div><h4 id='method.set_min_dimensions' class="method"><code id='set_min_dimensions.v'>pub fn <a href='#method.set_min_dimensions' class='fnname'>set_min_dimensions</a>(&self, dimensions: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../winit/dpi/struct.LogicalSize.html" title="struct winit::dpi::LogicalSize">LogicalSize</a>>)</code><a class='srclink' href='../src/winit/window.rs.html#278-280' title='goto source code'>[src]</a></h4><div class='docblock'><p>Sets a minimum dimension size for the window.</p>
|
|
|
</div><h4 id='method.set_max_dimensions' class="method"><code id='set_max_dimensions.v'>pub fn <a href='#method.set_max_dimensions' class='fnname'>set_max_dimensions</a>(&self, dimensions: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../winit/dpi/struct.LogicalSize.html" title="struct winit::dpi::LogicalSize">LogicalSize</a>>)</code><a class='srclink' href='../src/winit/window.rs.html#284-286' title='goto source code'>[src]</a></h4><div class='docblock'><p>Sets a maximum dimension size for the window.</p>
|
|
|
</div><h4 id='method.set_resizable' class="method"><code id='set_resizable.v'>pub fn <a href='#method.set_resizable' class='fnname'>set_resizable</a>(&self, resizable: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</code><a class='srclink' href='../src/winit/window.rs.html#299-301' title='goto source code'>[src]</a></h4><div class='docblock'><p>Sets whether the window is resizable or not.</p>
|
|
|
<p>Note that making the window unresizable doesn't exempt you from handling <code>Resized</code>, as that event can still be
|
|
|
triggered by DPI scaling, entering fullscreen mode, etc.</p>
|
|
|
<h2 id="platform-specific-2" class="section-header"><a href="#platform-specific-2">Platform-specific</a></h2>
|
|
|
<p>This only has an effect on desktop platforms.</p>
|
|
|
<p>Due to a bug in XFCE, this has no effect on Xfwm.</p>
|
|
|
</div><h4 id='method.get_hidpi_factor' class="method"><code id='get_hidpi_factor.v'>pub fn <a href='#method.get_hidpi_factor' class='fnname'>get_hidpi_factor</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code><a class='srclink' href='../src/winit/window.rs.html#316-318' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the DPI factor that can be used to map logical pixels to physical pixels, and vice versa.</p>
|
|
|
<p>See the <a href="dpi/index.html"><code>dpi</code></a> module for more information.</p>
|
|
|
<p>Note that this value can change depending on user action (for example if the window is
|
|
|
moved to another screen); as such, tracking <code>WindowEvent::HiDpiFactorChanged</code> events is
|
|
|
the most robust way to track the DPI you need to use to draw.</p>
|
|
|
<h2 id="platform-specific-3" class="section-header"><a href="#platform-specific-3">Platform-specific</a></h2>
|
|
|
<ul>
|
|
|
<li><strong>X11:</strong> Can be overridden using the <code>WINIT_HIDPI_FACTOR</code> environment variable.</li>
|
|
|
<li><strong>Android:</strong> Always returns 1.0.</li>
|
|
|
</ul>
|
|
|
</div><h4 id='method.set_cursor' class="method"><code id='set_cursor.v'>pub fn <a href='#method.set_cursor' class='fnname'>set_cursor</a>(&self, cursor: <a class="enum" href="../winit/enum.MouseCursor.html" title="enum winit::MouseCursor">MouseCursor</a>)</code><a class='srclink' href='../src/winit/window.rs.html#323-325' title='goto source code'>[src]</a></h4><div class='docblock'><p>Modifies the mouse cursor of the window.
|
|
|
Has no effect on Android.</p>
|
|
|
</div><h4 id='method.set_cursor_position' class="method"><code id='set_cursor_position.v'>pub fn <a href='#method.set_cursor_position' class='fnname'>set_cursor_position</a>(<br> &self, <br> position: <a class="struct" href="../winit/dpi/struct.LogicalPosition.html" title="struct winit::dpi::LogicalPosition">LogicalPosition</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code><a class='srclink' href='../src/winit/window.rs.html#329-331' title='goto source code'>[src]</a></h4><div class='docblock'><p>Changes the position of the cursor in window coordinates.</p>
|
|
|
</div><h4 id='method.grab_cursor' class="method"><code id='grab_cursor.v'>pub fn <a href='#method.grab_cursor' class='fnname'>grab_cursor</a>(&self, grab: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code><a class='srclink' href='../src/winit/window.rs.html#341-343' title='goto source code'>[src]</a></h4><div class='docblock'><p>Grabs the cursor, preventing it from leaving the window.</p>
|
|
|
<h2 id="platform-specific-4" class="section-header"><a href="#platform-specific-4">Platform-specific</a></h2>
|
|
|
<p>On macOS, this presently merely locks the cursor in a fixed location, which looks visually awkward.</p>
|
|
|
<p>This has no effect on Android or iOS.</p>
|
|
|
</div><h4 id='method.hide_cursor' class="method"><code id='hide_cursor.v'>pub fn <a href='#method.hide_cursor' class='fnname'>hide_cursor</a>(&self, hide: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</code><a class='srclink' href='../src/winit/window.rs.html#356-358' title='goto source code'>[src]</a></h4><div class='docblock'><p>Hides the cursor, making it invisible but still usable.</p>
|
|
|
<h2 id="platform-specific-5" class="section-header"><a href="#platform-specific-5">Platform-specific</a></h2>
|
|
|
<p>On Windows and X11, the cursor is only hidden within the confines of the window.</p>
|
|
|
<p>On macOS, the cursor is hidden as long as the window has input focus, even if the cursor is outside of the
|
|
|
window.</p>
|
|
|
<p>This has no effect on Android or iOS.</p>
|
|
|
</div><h4 id='method.set_maximized' class="method"><code id='set_maximized.v'>pub fn <a href='#method.set_maximized' class='fnname'>set_maximized</a>(&self, maximized: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</code><a class='srclink' href='../src/winit/window.rs.html#362-364' title='goto source code'>[src]</a></h4><div class='docblock'><p>Sets the window to maximized or back</p>
|
|
|
</div><h4 id='method.set_fullscreen' class="method"><code id='set_fullscreen.v'>pub fn <a href='#method.set_fullscreen' class='fnname'>set_fullscreen</a>(&self, monitor: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../winit/struct.MonitorId.html" title="struct winit::MonitorId">MonitorId</a>>)</code><a class='srclink' href='../src/winit/window.rs.html#368-370' title='goto source code'>[src]</a></h4><div class='docblock'><p>Sets the window to fullscreen or back</p>
|
|
|
</div><h4 id='method.set_decorations' class="method"><code id='set_decorations.v'>pub fn <a href='#method.set_decorations' class='fnname'>set_decorations</a>(&self, decorations: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</code><a class='srclink' href='../src/winit/window.rs.html#374-376' title='goto source code'>[src]</a></h4><div class='docblock'><p>Turn window decorations on or off.</p>
|
|
|
</div><h4 id='method.set_always_on_top' class="method"><code id='set_always_on_top.v'>pub fn <a href='#method.set_always_on_top' class='fnname'>set_always_on_top</a>(&self, always_on_top: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</code><a class='srclink' href='../src/winit/window.rs.html#380-382' title='goto source code'>[src]</a></h4><div class='docblock'><p>Change whether or not the window will always be on top of other windows.</p>
|
|
|
</div><h4 id='method.set_window_icon' class="method"><code id='set_window_icon.v'>pub fn <a href='#method.set_window_icon' class='fnname'>set_window_icon</a>(&self, window_icon: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../winit/struct.Icon.html" title="struct winit::Icon">Icon</a>>)</code><a class='srclink' href='../src/winit/window.rs.html#393-395' title='goto source code'>[src]</a></h4><div class='docblock'><p>Sets the window icon. On Windows and X11, this is typically the small icon in the top-left
|
|
|
corner of the titlebar.</p>
|
|
|
<p>For more usage notes, see <code>WindowBuilder::with_window_icon</code>.</p>
|
|
|
<h2 id="platform-specific-6" class="section-header"><a href="#platform-specific-6">Platform-specific</a></h2>
|
|
|
<p>This only has an effect on Windows and X11.</p>
|
|
|
</div><h4 id='method.set_ime_spot' class="method"><code id='set_ime_spot.v'>pub fn <a href='#method.set_ime_spot' class='fnname'>set_ime_spot</a>(&self, position: <a class="struct" href="../winit/dpi/struct.LogicalPosition.html" title="struct winit::dpi::LogicalPosition">LogicalPosition</a>)</code><a class='srclink' href='../src/winit/window.rs.html#399-401' title='goto source code'>[src]</a></h4><div class='docblock'><p>Sets location of IME candidate box in client area coordinates relative to the top left.</p>
|
|
|
</div><h4 id='method.get_current_monitor' class="method"><code id='get_current_monitor.v'>pub fn <a href='#method.get_current_monitor' class='fnname'>get_current_monitor</a>(&self) -> <a class="struct" href="../winit/struct.MonitorId.html" title="struct winit::MonitorId">MonitorId</a></code><a class='srclink' href='../src/winit/window.rs.html#405-407' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the monitor on which the window currently resides</p>
|
|
|
</div><h4 id='method.get_available_monitors' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../winit/struct.AvailableMonitorsIter.html" title="struct winit::AvailableMonitorsIter">AvailableMonitorsIter</a></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../winit/struct.AvailableMonitorsIter.html" title="struct winit::AvailableMonitorsIter">AvailableMonitorsIter</a></h3><code class="content"><span class="where fmt-newline">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a> for <a class="struct" href="../winit/struct.AvailableMonitorsIter.html" title="struct winit::AvailableMonitorsIter">AvailableMonitorsIter</a></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../winit/struct.MonitorId.html" title="struct winit::MonitorId">MonitorId</a>;</span></code></div></div><code id='get_available_monitors.v'>pub fn <a href='#method.get_available_monitors' class='fnname'>get_available_monitors</a>(&self) -> <a class="struct" href="../winit/struct.AvailableMonitorsIter.html" title="struct winit::AvailableMonitorsIter">AvailableMonitorsIter</a></code><a class='srclink' href='../src/winit/window.rs.html#413-416' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the list of all the monitors available on the system.</p>
|
|
|
<p>This is the same as <code>EventsLoop::get_available_monitors</code>, and is provided for convenience.</p>
|
|
|
</div><h4 id='method.get_primary_monitor' class="method"><code id='get_primary_monitor.v'>pub fn <a href='#method.get_primary_monitor' class='fnname'>get_primary_monitor</a>(&self) -> <a class="struct" href="../winit/struct.MonitorId.html" title="struct winit::MonitorId">MonitorId</a></code><a class='srclink' href='../src/winit/window.rs.html#422-424' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the primary monitor of the system.</p>
|
|
|
<p>This is the same as <code>EventsLoop::get_primary_monitor</code>, and is provided for convenience.</p>
|
|
|
</div><h4 id='method.id' class="method"><code id='id.v'>pub fn <a href='#method.id' class='fnname'>id</a>(&self) -> <a class="struct" href="../winit/struct.WindowId.html" title="struct winit::WindowId">WindowId</a></code><a class='srclink' href='../src/winit/window.rs.html#427-429' title='goto source code'>[src]</a></h4></div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-WindowExt' class='impl'><code class='in-band'>impl <a class="trait" href="../winit/os/unix/trait.WindowExt.html" title="trait winit::os::unix::WindowExt">WindowExt</a> for <a class="struct" href="../winit/struct.Window.html" title="struct winit::Window">Window</a></code><a href='#impl-WindowExt' class='anchor'></a><a class='srclink' href='../src/winit/os/unix.rs.html#228-305' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.get_xlib_window' class="method hidden"><code id='get_xlib_window.v'>fn <a href='../winit/os/unix/trait.WindowExt.html#tymethod.get_xlib_window' class='fnname'>get_xlib_window</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="type" href="https://doc.rust-lang.org/nightly/std/os/raw/type.c_ulong.html" title="type std::os::raw::c_ulong">c_ulong</a>></code><a class='srclink' href='../src/winit/os/unix.rs.html#230-235' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns the ID of the <code>Window</code> xlib object that is used by this window. <a href="../winit/os/unix/trait.WindowExt.html#tymethod.get_xlib_window">Read more</a></p>
|
|
|
</div><h4 id='method.get_xlib_display' class="method hidden"><code id='get_xlib_display.v'>fn <a href='../winit/os/unix/trait.WindowExt.html#tymethod.get_xlib_display' class='fnname'>get_xlib_display</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a><a class="enum" href="https://doc.rust-lang.org/nightly/core/ffi/enum.c_void.html" title="enum core::ffi::c_void">c_void</a>></code><a class='srclink' href='../src/winit/os/unix.rs.html#238-243' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a pointer to the <code>Display</code> object of xlib that is used by this window. <a href="../winit/os/unix/trait.WindowExt.html#tymethod.get_xlib_display">Read more</a></p>
|
|
|
</div><h4 id='method.get_xlib_screen_id' class="method hidden"><code id='get_xlib_screen_id.v'>fn <a href='../winit/os/unix/trait.WindowExt.html#tymethod.get_xlib_screen_id' class='fnname'>get_xlib_screen_id</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="type" href="https://doc.rust-lang.org/nightly/std/os/raw/type.c_int.html" title="type std::os::raw::c_int">c_int</a>></code><a class='srclink' href='../src/winit/os/unix.rs.html#246-251' title='goto source code'>[src]</a></h4><h4 id='method.get_xcb_connection' class="method hidden"><code id='get_xcb_connection.v'>fn <a href='../winit/os/unix/trait.WindowExt.html#tymethod.get_xcb_connection' class='fnname'>get_xcb_connection</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a><a class="enum" href="https://doc.rust-lang.org/nightly/core/ffi/enum.c_void.html" title="enum core::ffi::c_void">c_void</a>></code><a class='srclink' href='../src/winit/os/unix.rs.html#263-268' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>This function returns the underlying <code>xcb_connection_t</code> of an xlib <code>Display</code>. <a href="../winit/os/unix/trait.WindowExt.html#tymethod.get_xcb_connection">Read more</a></p>
|
|
|
</div><h4 id='method.set_urgent' class="method hidden"><code id='set_urgent.v'>fn <a href='../winit/os/unix/trait.WindowExt.html#tymethod.set_urgent' class='fnname'>set_urgent</a>(&self, is_urgent: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</code><a class='srclink' href='../src/winit/os/unix.rs.html#271-275' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Set window urgency hint (<code>XUrgencyHint</code>). Only relevant on X.</p>
|
|
|
</div><h4 id='method.get_wayland_surface' class="method hidden"><code id='get_wayland_surface.v'>fn <a href='../winit/os/unix/trait.WindowExt.html#tymethod.get_wayland_surface' class='fnname'>get_wayland_surface</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a><a class="enum" href="https://doc.rust-lang.org/nightly/core/ffi/enum.c_void.html" title="enum core::ffi::c_void">c_void</a>></code><a class='srclink' href='../src/winit/os/unix.rs.html#278-283' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a pointer to the <code>wl_surface</code> object of wayland that is used by this window. <a href="../winit/os/unix/trait.WindowExt.html#tymethod.get_wayland_surface">Read more</a></p>
|
|
|
</div><h4 id='method.get_wayland_display' class="method hidden"><code id='get_wayland_display.v'>fn <a href='../winit/os/unix/trait.WindowExt.html#tymethod.get_wayland_display' class='fnname'>get_wayland_display</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a><a class="enum" href="https://doc.rust-lang.org/nightly/core/ffi/enum.c_void.html" title="enum core::ffi::c_void">c_void</a>></code><a class='srclink' href='../src/winit/os/unix.rs.html#286-291' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a pointer to the <code>wl_display</code> object of wayland that is used by this window. <a href="../winit/os/unix/trait.WindowExt.html#tymethod.get_wayland_display">Read more</a></p>
|
|
|
</div><h4 id='method.set_wayland_theme' class="method hidden"><code id='set_wayland_theme.v'>fn <a href='../winit/os/unix/trait.WindowExt.html#tymethod.set_wayland_theme' class='fnname'>set_wayland_theme</a>(&self, theme: <a class="struct" href="../winit/os/unix/struct.WaylandTheme.html" title="struct winit::os::unix::WaylandTheme">WaylandTheme</a>)</code><a class='srclink' href='../src/winit/os/unix.rs.html#294-299' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Sets the color theme of the client side window decorations on wayland</p>
|
|
|
</div><h4 id='method.is_ready' class="method hidden"><code id='is_ready.v'>fn <a href='../winit/os/unix/trait.WindowExt.html#tymethod.is_ready' class='fnname'>is_ready</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/winit/os/unix.rs.html#302-304' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab deprecated'>Deprecated</div></div><div class='docblock hidden'><p>Check if the window is ready for drawing <a href="../winit/os/unix/trait.WindowExt.html#tymethod.is_ready">Read more</a></p>
|
|
|
</div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>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="../winit/struct.Window.html" title="struct winit::Window">Window</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/winit/lib.rs.html#160-164' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code id='fmt.v'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, fmtr: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../src/winit/lib.rs.html#161-163' title='goto source code'>[src]</a></h4><div class='docblock hidden'><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></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-Send' class='impl'><code class='in-band'>impl <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="../winit/struct.Window.html" title="struct winit::Window">Window</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../winit/struct.Window.html" title="struct winit::Window">Window</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <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="../winit/struct.Window.html" title="struct winit::Window">Window</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../winit/struct.Window.html" title="struct winit::Window">Window</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../winit/struct.Window.html" title="struct winit::Window">Window</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#544-549' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -> U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#546-548' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
|
|
</div></div><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#553-555' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#554' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
|
|
</div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#572-578' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
|
|
</div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#575-577' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
|
|
</div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#560-567' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
|
|
</div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#564-566' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
|
|
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
|
|
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
|
|
</div></div><h3 id='impl-Any' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
|
|
</div></div><h3 id='impl-Erased' class='impl'><code class='in-band'>impl<T> <a class="trait" href="../owning_ref/trait.Erased.html" title="trait owning_ref::Erased">Erased</a> for T</code><a href='#impl-Erased' class='anchor'></a><a class='srclink' href='../src/owning_ref/lib.rs.html#281' title='goto source code'>[src]</a></h3><div class='impl-items'></div></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><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse 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><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "winit";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> |