<!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 `DeviceSpecifier` enum in crate `ocl`.">
<meta name="keywords" content="rust, rustlang, rust-lang, DeviceSpecifier">
<title>ocl::builders::DeviceSpecifier - 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 enum">
<!--[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'><a href='../index.html'>ocl</a>::<wbr><a href='index.html'>builders</a></p><script>window.sidebarCurrent = {name: 'DeviceSpecifier', ty: 'enum', 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'>Enum <a href='../index.html'>ocl</a>::<wbr><a href='index.html'>builders</a>::<wbr><a class="enum" href=''>DeviceSpecifier</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'>−</span>]
</a>
</span><a class='srclink' href='../../src/ocl/standard/device.rs.html#55-63' title='goto source code'>[src]</a></span></h1>
<pre class='rust enum'>pub enum DeviceSpecifier {
All,
First,
Single(<a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a>),
List(<a class="struct" href="https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html" title="struct collections::vec::Vec">Vec</a><<a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a>>),
Indices(<a class="struct" href="https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html" title="struct collections::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>),
WrappingIndices(<a class="struct" href="https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html" title="struct collections::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>),
TypeFlags(<a class="struct" href="../../ocl/flags/struct.DeviceType.html" title="struct ocl::flags::DeviceType">DeviceType</a>),
}</pre><div class='docblock'><p>Specifies [what boils down to] a list of devices.</p>
<p>The <code>Indices</code> variant is context-specific, not robust, and may lead to a
panic if the context changes. It is useful for convenience only and not
recommended for general use. The <code>WrappingIndices</code> variant is somewhat
less dangerous but can still be somewhat machine-specific.</p>
<p>The <code>TypeFlags</code> variant is used for specifying a list of devices using a
bitfield (<code>DeviceType</code>) and is the most robust / portable.</p>
<p>[FIXME: Add some links to the SDK]</p>
</div><h2 class='variants'>Variants</h2>
<span id='variant.All' class='variant'><span id='All.v' class='invisible'><code>All</code></span></span><span id='variant.First' class='variant'><span id='First.v' class='invisible'><code>First</code></span></span><span id='variant.Single' class='variant'><span id='Single.v' class='invisible'><code>Single(<a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a>)</code></span></span><span id='variant.List' class='variant'><span id='List.v' class='invisible'><code>List(<a class="struct" href="https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html" title="struct collections::vec::Vec">Vec</a><<a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a>>)</code></span></span><span id='variant.Indices' class='variant'><span id='Indices.v' class='invisible'><code>Indices(<a class="struct" href="https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html" title="struct collections::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>)</code></span></span><span id='variant.WrappingIndices' class='variant'><span id='WrappingIndices.v' class='invisible'><code>WrappingIndices(<a class="struct" href="https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html" title="struct collections::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>)</code></span></span><span id='variant.TypeFlags' class='variant'><span id='TypeFlags.v' class='invisible'><code>TypeFlags(<a class="struct" href="../../ocl/flags/struct.DeviceType.html" title="struct ocl::flags::DeviceType">DeviceType</a>)</code></span></span><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#65-173' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.all' class="method"><span id='all.v' class='invisible'><code>fn <a href='#method.all' class='fnname'>all</a>(self) -> <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></h4>
<div class='docblock'><p>Returns a <code>DeviceSpecifier::All</code> variant which specifies all
devices on a platform.</p>
</div><h4 id='method.first' class="method"><span id='first.v' class='invisible'><code>fn <a href='#method.first' class='fnname'>first</a>(self) -> <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></h4>
<div class='docblock'><p>Returns a <code>DeviceSpecifier::First</code> variant which specifies only
the first device on a platform.</p>
</div><h4 id='method.single' class="method"><span id='single.v' class='invisible'><code>fn <a href='#method.single' class='fnname'>single</a>(self, device: <a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a>) -> <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></h4>
<div class='docblock'><p>Returns a <code>DeviceSpecifier::Single</code> variant which specifies a single
device.</p>
</div><h4 id='method.list' class="method"><span id='list.v' class='invisible'><code>fn <a href='#method.list' class='fnname'>list</a>(self, list: <a class="struct" href="https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html" title="struct collections::vec::Vec">Vec</a><<a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a>>) -> <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></h4>
<div class='docblock'><p>Returns a <code>DeviceSpecifier::List</code> variant which specifies a list of
devices.</p>
</div><h4 id='method.indices' class="method"><span id='indices.v' class='invisible'><code>unsafe fn <a href='#method.indices' class='fnname'>indices</a>(self, indices: <a class="struct" href="https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html" title="struct collections::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>) -> <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></h4>
<div class='docblock'><p>Returns a <code>DeviceSpecifier::Indices</code> variant which specifies a list of
devices by index.</p>
<h3 id="safety" class="section-header"><a href="#safety">Safety</a></h3>
<p>This variant is context-specific, not robust, and may lead to a panic
if the context changes. It is useful for convenience only and not
recommended for general use.</p>
<p>Though using the <code>Indices</code> variant is not strictly unsafe in the usual
way (will not lead to memory bugs, etc.), it is marked unsafe as a
warning. Recommendations for a more idiomatic way to express this
potential footgun are welcome.</p>
<p>Using <code>::wrapping_indices</code> is a more robust (but still potentially
non-portable) solution.</p>
</div><h4 id='method.wrapping_indices' class="method"><span id='wrapping_indices.v' class='invisible'><code>fn <a href='#method.wrapping_indices' class='fnname'>wrapping_indices</a>(self, windices: <a class="struct" href="https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html" title="struct collections::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>) -> <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></h4>
<div class='docblock'><p>Returns a <code>DeviceSpecifier::WrappingIndices</code> variant, specifying a
list of devices by indices which are wrapped around (simply using the
modulo operator) so that every index is always valid.</p>
</div><h4 id='method.type_flags' class="method"><span id='type_flags.v' class='invisible'><code>fn <a href='#method.type_flags' class='fnname'>type_flags</a>(self, flags: <a class="struct" href="../../ocl/flags/struct.DeviceType.html" title="struct ocl::flags::DeviceType">DeviceType</a>) -> <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></h4>
<div class='docblock'><p>Returns a <code>DeviceSpecifier::TypeFlags</code> variant which specifies a list
of devices using a conventional bitfield.</p>
</div><h4 id='method.to_device_list' class="method"><span id='to_device_list.v' class='invisible'><code>fn <a href='#method.to_device_list' class='fnname'>to_device_list</a><P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><<a class="struct" href="../../ocl/struct.Platform.html" title="struct ocl::Platform">Platform</a>>>(<br> &self, <br> platform: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><P><br>) -> <a class="type" href="../../ocl/type.Result.html" title="type ocl::Result">OclResult</a><<a class="struct" href="https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html" title="struct collections::vec::Vec">Vec</a><<a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a>>></code></span></h4>
<div class='docblock'><p>Returns the list of devices matching the parameters specified by this
<code>DeviceSpecifier</code></p>
<h3 id="panics" class="section-header"><a href="#panics">Panics</a></h3>
<p>Any device indices listed within the <code>Indices</code> variant must be within
the range of the number of devices for the platform specified by
<code>Platform</code>. If no <code>platform</code> has been specified, this behaviour is
undefined and could end up using any platform at all.</p>
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 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="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#54' 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>(&self, __arg_0: &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></span></h4>
<div class='docblock'><p>Formats the value using the given formatter.</p>
</div></div><h3 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="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#54' 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>(&self) -> <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></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>(&mut self, source: &Self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></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 class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#175-179' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.default' class="method"><span id='default.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -> <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></h4>
<div class='docblock'><p>Returns the "default value" for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>> for <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#181-185' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from' class="method"><span id='from.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 class='impl'><span class='in-band'><code>impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>> for <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#187-191' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from-1' class="method"><span id='from.v-1' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(indices: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 class='impl'><span class='in-band'><code>impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="struct" href="https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html" title="struct collections::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>> for <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#193-197' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from-2' class="method"><span id='from.v-2' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(indices: &'a <a class="struct" href="https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html" title="struct collections::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>>) -> <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 class='impl'><span class='in-band'><code>impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</a><a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>> for <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#199-203' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from-3' class="method"><span id='from.v-3' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(devices: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'a [</a><a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>) -> <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 class='impl'><span class='in-band'><code>impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="struct" href="https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html" title="struct collections::vec::Vec">Vec</a><<a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a>>> for <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#205-209' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from-4' class="method"><span id='from.v-4' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(devices: &'a <a class="struct" href="https://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html" title="struct collections::vec::Vec">Vec</a><<a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a>>) -> <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a>> for <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#211-215' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from-5' class="method"><span id='from.v-5' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(device: <a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a>) -> <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 class='impl'><span class='in-band'><code>impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><&'a <a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a>> for <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#217-221' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from-6' class="method"><span id='from.v-6' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(device: &'a <a class="struct" href="../../ocl/struct.Device.html" title="struct ocl::Device">Device</a>) -> <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../../ocl/flags/struct.DeviceType.html" title="struct ocl::flags::DeviceType">DeviceType</a>> for <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/ocl/standard/device.rs.html#223-227' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from-7' class="method"><span id='from.v-7' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(flags: <a class="struct" href="../../ocl/flags/struct.DeviceType.html" title="struct ocl::flags::DeviceType">DeviceType</a>) -> <a class="enum" href="../../ocl/builders/enum.DeviceSpecifier.html" title="enum ocl::builders::DeviceSpecifier">DeviceSpecifier</a></code></span></h4>
<div class='docblock'><p>Performs the conversion.</p>
</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>?</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>Go to active search result</dd>
<dt>+</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 = "ocl";
</script>
<script src="../../jquery.js"></script>
<script src="../../main.js"></script>
<script defer src="../../search-index.js"></script>
</body>
</html>