Files
phy/wgpu_hal/trait.Adapter.html
Orion Kindel 0ce894e6b0 doc
2025-03-18 10:30:23 -05:00

35 lines
13 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Adapter` trait in crate `wgpu_hal`."><title>Adapter in wgpu_hal - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="wgpu_hal" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.0 (9fc6b4312 2025-01-07)" data-channel="1.84.0" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../wgpu_hal/index.html">wgpu_<wbr>hal</a><span class="version">23.0.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Adapter</a></h2><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.A" title="A">A</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.get_presentation_timestamp" title="get_presentation_timestamp">get_presentation_timestamp</a></li><li><a href="#tymethod.open" title="open">open</a></li><li><a href="#tymethod.surface_capabilities" title="surface_capabilities">surface_capabilities</a></li><li><a href="#tymethod.texture_format_capabilities" title="texture_format_capabilities">texture_format_capabilities</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate wgpu_<wbr>hal</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">wgpu_hal</a></span><h1>Trait <span class="trait">Adapter</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/wgpu_hal/lib.rs.html#608-636">Source</a> </span></div><pre class="rust item-decl"><code>pub trait Adapter: <a class="trait" href="../wgpu_types/send_sync/trait.WasmNotSendSync.html" title="trait wgpu_types::send_sync::WasmNotSendSync">WasmNotSendSync</a> {
type <a href="#associatedtype.A" class="associatedtype">A</a>: <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>;
// Required methods
unsafe fn <a href="#tymethod.open" class="fn">open</a>(
&amp;self,
features: <a class="struct" href="../wgpu_types/struct.Features.html" title="struct wgpu_types::Features">Features</a>,
limits: &amp;<a class="struct" href="../wgpu_types/struct.Limits.html" title="struct wgpu_types::Limits">Limits</a>,
memory_hints: &amp;<a class="enum" href="../wgpu_types/enum.MemoryHints.html" title="enum wgpu_types::MemoryHints">MemoryHints</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.OpenDevice.html" title="struct wgpu_hal::OpenDevice">OpenDevice</a>&lt;Self::<a class="associatedtype" href="trait.Adapter.html#associatedtype.A" title="type wgpu_hal::Adapter::A">A</a>&gt;, <a class="enum" href="enum.DeviceError.html" title="enum wgpu_hal::DeviceError">DeviceError</a>&gt;;
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.texture_format_capabilities" class="fn">texture_format_capabilities</a>(
&amp;self,
format: <a class="enum" href="../wgpu_types/enum.TextureFormat.html" title="enum wgpu_types::TextureFormat">TextureFormat</a>,
) -&gt; <a class="struct" href="struct.TextureFormatCapabilities.html" title="struct wgpu_hal::TextureFormatCapabilities">TextureFormatCapabilities</a>;
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.surface_capabilities" class="fn">surface_capabilities</a>(
&amp;self,
surface: &amp;&lt;Self::<a class="associatedtype" href="trait.Adapter.html#associatedtype.A" title="type wgpu_hal::Adapter::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>&gt;::<a class="associatedtype" href="trait.Api.html#associatedtype.Surface" title="type wgpu_hal::Api::Surface">Surface</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.SurfaceCapabilities.html" title="struct wgpu_hal::SurfaceCapabilities">SurfaceCapabilities</a>&gt;;
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.get_presentation_timestamp" class="fn">get_presentation_timestamp</a>(&amp;self) -&gt; <a class="struct" href="../wgpu_types/struct.PresentationTimestamp.html" title="struct wgpu_types::PresentationTimestamp">PresentationTimestamp</a>;
}</code></pre><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><section id="associatedtype.A" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#609">Source</a><h4 class="code-header">type <a href="#associatedtype.A" class="associatedtype">A</a>: <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a></h4></section></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><section id="tymethod.open" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#611-616">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.open" class="fn">open</a>(
&amp;self,
features: <a class="struct" href="../wgpu_types/struct.Features.html" title="struct wgpu_types::Features">Features</a>,
limits: &amp;<a class="struct" href="../wgpu_types/struct.Limits.html" title="struct wgpu_types::Limits">Limits</a>,
memory_hints: &amp;<a class="enum" href="../wgpu_types/enum.MemoryHints.html" title="enum wgpu_types::MemoryHints">MemoryHints</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.OpenDevice.html" title="struct wgpu_hal::OpenDevice">OpenDevice</a>&lt;Self::<a class="associatedtype" href="trait.Adapter.html#associatedtype.A" title="type wgpu_hal::Adapter::A">A</a>&gt;, <a class="enum" href="enum.DeviceError.html" title="enum wgpu_hal::DeviceError">DeviceError</a>&gt;</h4></section><details class="toggle method-toggle" open><summary><section id="tymethod.texture_format_capabilities" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#619-622">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.texture_format_capabilities" class="fn">texture_format_capabilities</a>(
&amp;self,
format: <a class="enum" href="../wgpu_types/enum.TextureFormat.html" title="enum wgpu_types::TextureFormat">TextureFormat</a>,
) -&gt; <a class="struct" href="struct.TextureFormatCapabilities.html" title="struct wgpu_hal::TextureFormatCapabilities">TextureFormatCapabilities</a></h4></section></summary><div class="docblock"><p>Return the set of supported capabilities for a texture format.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.surface_capabilities" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#627-630">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.surface_capabilities" class="fn">surface_capabilities</a>(
&amp;self,
surface: &amp;&lt;Self::<a class="associatedtype" href="trait.Adapter.html#associatedtype.A" title="type wgpu_hal::Adapter::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>&gt;::<a class="associatedtype" href="trait.Api.html#associatedtype.Surface" title="type wgpu_hal::Api::Surface">Surface</a>,
) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.SurfaceCapabilities.html" title="struct wgpu_hal::SurfaceCapabilities">SurfaceCapabilities</a>&gt;</h4></section></summary><div class="docblock"><p>Returns the capabilities of working with a specified surface.</p>
<p><code>None</code> means presentation is not supported for it.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.get_presentation_timestamp" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#635">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.get_presentation_timestamp" class="fn">get_presentation_timestamp</a>(&amp;self) -&gt; <a class="struct" href="../wgpu_types/struct.PresentationTimestamp.html" title="struct wgpu_types::PresentationTimestamp">PresentationTimestamp</a></h4></section></summary><div class="docblock"><p>Creates a <a href="../wgpu_types/struct.PresentationTimestamp.html" title="struct wgpu_types::PresentationTimestamp"><code>PresentationTimestamp</code></a> using the adapters WSI.</p>
</div></details></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-Adapter-for-Context" class="impl"><a class="src rightside" href="../src/wgpu_hal/empty.rs.html#112-137">Source</a><a href="#impl-Adapter-for-Context" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Adapter.html" title="trait wgpu_hal::Adapter">Adapter</a> for <a class="struct" href="empty/struct.Context.html" title="struct wgpu_hal::empty::Context">Context</a></h3></section></summary><div class="impl-items"><section id="associatedtype.A-1" class="associatedtype trait-impl"><a class="src rightside" href="../src/wgpu_hal/empty.rs.html#113">Source</a><a href="#associatedtype.A-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.A" class="associatedtype">A</a> = <a class="struct" href="empty/struct.Api.html" title="struct wgpu_hal::empty::Api">Api</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Adapter-for-Adapter" class="impl"><a class="src rightside" href="../src/wgpu_hal/gles/adapter.rs.html#939-1215">Source</a><a href="#impl-Adapter-for-Adapter" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Adapter.html" title="trait wgpu_hal::Adapter">Adapter</a> for wgpu_hal::gles::<a class="struct" href="gles/struct.Adapter.html" title="struct wgpu_hal::gles::Adapter">Adapter</a></h3></section></summary><div class="impl-items"><section id="associatedtype.A-2" class="associatedtype trait-impl"><a class="src rightside" href="../src/wgpu_hal/gles/adapter.rs.html#940">Source</a><a href="#associatedtype.A-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.A" class="associatedtype">A</a> = <a class="struct" href="gles/struct.Api.html" title="struct wgpu_hal::gles::Api">Api</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Adapter-for-Adapter-1" class="impl"><a class="src rightside" href="../src/wgpu_hal/vulkan/adapter.rs.html#2012-2324">Source</a><a href="#impl-Adapter-for-Adapter-1" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Adapter.html" title="trait wgpu_hal::Adapter">Adapter</a> for wgpu_hal::vulkan::<a class="struct" href="vulkan/struct.Adapter.html" title="struct wgpu_hal::vulkan::Adapter">Adapter</a></h3></section></summary><div class="impl-items"><section id="associatedtype.A-3" class="associatedtype trait-impl"><a class="src rightside" href="../src/wgpu_hal/vulkan/adapter.rs.html#2013">Source</a><a href="#associatedtype.A-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.A" class="associatedtype">A</a> = <a class="struct" href="vulkan/struct.Api.html" title="struct wgpu_hal::vulkan::Api">Api</a></h4></section></div></details></div><script src="../trait.impl/wgpu_hal/trait.Adapter.js" async></script></section></div></main></body></html>