You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
99 lines
85 KiB
99 lines
85 KiB
5 years ago
|
<!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 `ImageBuffer` struct in crate `image`."><meta name="keywords" content="rust, rustlang, rust-lang, ImageBuffer"><title>image::ImageBuffer - 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='../image/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct ImageBuffer</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.as_flat_samples">as_flat_samples</a><a href="#method.dimensions">dimensions</a><a href="#method.enumerate_pixels">enumerate_pixels</a><a href="#method.enumerate_pixels_mut">enumerate_pixels_mut</a><a href="#method.from_fn">from_fn</a><a href="#method.from_pixel">from_pixel</a><a href="#method.from_raw">from_raw</a><a href="#method.from_vec">from_vec</a><a href="#method.get_pixel">get_pixel</a><a href="#method.get_pixel_mut">get_pixel_mut</a><a href="#method.height">height</a><a href="#method.into_flat_samples">into_flat_samples</a><a href="#method.into_raw">into_raw</a><a href="#method.into_vec">into_vec</a><a href="#method.new">new</a><a href="#method.pixels">pixels</a><a href="#method.pixels_mut">pixels_mut</a><a href="#method.put_pixel">put_pixel</a><a href="#method.sample_layout">sample_layout</a><a href="#method.save">save</a><a href="#method.width">width</a></div><a class="sidebar-title" href="#deref-methods">Methods from Deref<Target=[P::Subpixel]></a><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-ConvertBuffer%3CImageBuffer%3CToType%2C%20Vec%3C%3CToType%20as%20Pixel%3E%3A%3ASubpixel%3E%3E%3E">ConvertBuffer<ImageBuffer<ToType, Vec<<ToType as Pixel>::Subpixel>>></a><a href="#impl-Debug">Debug</a><a href="#impl-Deref">Deref</a><a href="#impl-DerefMut">DerefMut</a><a href="#impl-GenericImage">GenericImage</a><a href="#impl-GenericImageView">GenericImageView</a><a href="#impl-Index%3C(u32%2C%20u32)%3E">Index<(u32, u32)></a><a href="#impl-IndexMut%3C(u32%2C%20u32)%3E">IndexMut<(u32, u32)></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-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-SetParameter">SetParameter</a><a href="#impl-ToOwned">ToOwned</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'>image</a></p><script>window.sidebarCurrent = {name: 'ImageBuffer', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items
|
||
|
</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<P, Container> <a class="struct" href="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><P, Container> <span class="where fmt-newline">where<br> P: <a class="trait" href="../image/trait.Pixel.html" title="trait image::Pixel">Pixel</a> + 'static,<br> P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>: 'static,<br> Container: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a><Target = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a>P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>>, </span></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/image/buffer.rs.html#307-452' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from_raw' class="method"><code id='from_raw.v'>pub fn <a href='#method.from_raw' class='fnname'>from_raw</a>(<br> width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br> height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br> buf: Container<br>) -> <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="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><P, Container>></code><a class='srclink' href='../src/image/buffer.rs.html#318-329' title='goto source code'>[src]</a></h4><div class='docblock'><p>Contructs a buffer from a generic container
|
||
|
(for example a <code>Vec</code> or a slice)</p>
|
||
|
<p>Returns <code>None</code> if the container is not big enough (including when the image dimensions
|
||
|
necessitate an allocation of more bytes than supported by the container).</p>
|
||
|
</div><h4 id='method.into_raw' class="method"><code id='into_raw.v'>pub fn <a href='#method.into_raw' class='fnname'>into_raw</a>(self) -> Container</code><a class='srclink' href='../src/image/buffer.rs.html#332-334' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the underlying raw buffer</p>
|
||
|
</div><h4 id='method.dimensions' class="method"><code id='dimensions.v'>pub fn <a href='#method.dimensions' class='fnname'>dimensions</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/image/buffer.rs.html#337-339' title='goto source code'>[src]</a></h4><div class='docblock'><p>The width and height of this image.</p>
|
||
|
</div><h4 id='method.width' class="method"><code id='width.v'>pub fn <a href='#method.width' class='fnname'>width</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a class='srclink' href='../src/image/buffer.rs.html#342-344' title='goto source code'>[src]</a></h4><div class='docblock'><p>The width of this image.</p>
|
||
|
</div><h4 id='method.height' class="method"><code id='height.v'>pub fn <a href='#method.height' class='fnname'>height</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a class='srclink' href='../src/image/buffer.rs.html#347-349' title='goto source code'>[src]</a></h4><div class='docblock'><p>The height of this image.</p>
|
||
|
</div><h4 id='method.pixels' class="method"><code id='pixels.v'>pub fn <a href='#method.pixels' class='fnname'>pixels</a>(&self) -> Pixels<P></code><a class='srclink' href='../src/image/buffer.rs.html#352-356' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns an iterator over the pixels of this image.</p>
|
||
|
</div><h4 id='method.enumerate_pixels' class="method"><code id='enumerate_pixels.v'>pub fn <a href='#method.enumerate_pixels' class='fnname'>enumerate_pixels</a>(&self) -> EnumeratePixels<P></code><a class='srclink' href='../src/image/buffer.rs.html#361-368' title='goto source code'>[src]</a></h4><div class='docblock'><p>Enumerates over the pixels of the image.
|
||
|
The iterator yields the coordinates of each pixel
|
||
|
along with a reference to them.</p>
|
||
|
</div><h4 id='method.get_pixel' class="method"><code id='get_pixel.v'>pub fn <a href='#method.get_pixel' class='fnname'>get_pixel</a>(&self, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>P</code><a class='srclink' href='../src/image/buffer.rs.html#375-380' title='goto source code'>[src]</a></h4><div class='docblock'><p>Gets a reference to the pixel at location <code>(x, y)</code></p>
|
||
|
<h1 id="panics" class="section-header"><a href="#panics">Panics</a></h1>
|
||
|
<p>Panics if <code>(x, y)</code> is out of the bounds <code>(width, height)</code>.</p>
|
||
|
</div><h4 id='method.sample_layout' class="method"><code id='sample_layout.v'>pub fn <a href='#method.sample_layout' class='fnname'>sample_layout</a>(&self) -> <a class="struct" href="../image/flat/struct.SampleLayout.html" title="struct image::flat::SampleLayout">SampleLayout</a></code><a class='srclink' href='../src/image/buffer.rs.html#416-419' title='goto source code'>[src]</a></h4><div class='docblock'><p>Get the format of the buffer when viewed as a matrix of samples.</p>
|
||
|
</div><h4 id='method.into_flat_samples' class="method"><code id='into_flat_samples.v'>pub fn <a href='#method.into_flat_samples' class='fnname'>into_flat_samples</a>(self) -> <a class="struct" href="../image/flat/struct.FlatSamples.html" title="struct image::flat::FlatSamples">FlatSamples</a><Container> <span class="where fmt-newline">where<br> Container: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a>P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>>, </span></code><a class='srclink' href='../src/image/buffer.rs.html#427-437' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return the raw sample buffer with its stride an dimension information.</p>
|
||
|
<p>The returned buffer is guaranteed to be well formed in all cases. It is layed out by
|
||
|
colors, width then height, meaning <code>channel_stride <= width_stride <= height_stride</code>. All
|
||
|
strides are in numbers of elements but those are mostly <code>u8</code> in which case the strides are
|
||
|
also byte strides.</p>
|
||
|
</div><h4 id='method.as_flat_samples' class="method"><code id='as_flat_samples.v'>pub fn <a href='#method.as_flat_samples' class='fnname'>as_flat_samples</a>(&self) -> <a class="struct" href="../image/flat/struct.FlatSamples.html" title="struct image::flat::FlatSamples">FlatSamples</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a>P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>> <span class="where fmt-newline">where<br> Container: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a>P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>>, </span></code><a class='srclink' href='../src/image/buffer.rs.html#442-451' title='goto source code'>[src]</a></h4><div class='docblock'><p>Return a view on the raw sample buffer.</p>
|
||
|
<p>See <code>flattened</code> for more details.</p>
|
||
|
</div></div><h3 id='impl-1' class='impl'><code class='in-band'>impl<P, Container> <a class="struct" href="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><P, Container> <span class="where fmt-newline">where<br> P: <a class="trait" href="../image/trait.Pixel.html" title="trait image::Pixel">Pixel</a> + 'static,<br> P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>: 'static,<br> Container: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a><Target = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a>P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a>, </span></code><a href='#impl-1' class='anchor'></a><a class='srclink' href='../src/image/buffer.rs.html#454-500' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.pixels_mut' class="method"><code id='pixels_mut.v'>pub fn <a href='#method.pixels_mut' class='fnname'>pixels_mut</a>(&mut self) -> PixelsMut<P></code><a class='srclink' href='../src/image/buffer.rs.html#461-465' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns an iterator over the mutable pixels of this image.</p>
|
||
|
</div><h4 id='method.enumerate_pixels_mut' class="method"><code id='enumerate_pixels_mut.v'>pub fn <a href='#method.enumerate_pixels_mut' class='fnname'>enumerate_pixels_mut</a>(&mut self) -> EnumeratePixelsMut<P></code><a class='srclink' href='../src/image/buffer.rs.html#470-478' title='goto source code'>[src]</a></h4><div class='docblock'><p>Enumerates over the pixels of the image.
|
||
|
The iterator yields the coordinates of each pixel
|
||
|
along with a mutable reference to them.</p>
|
||
|
</div><h4 id='method.get_pixel_mut' class="method"><code id='get_pixel_mut.v'>pub fn <a href='#method.get_pixel_mut' class='fnname'>get_pixel_mut</a>(&mut self, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>P</code><a class='srclink' href='../src/image/buffer.rs.html#485-490' title='goto source code'>[src]</a></h4><div class='docblock'><p>Gets a reference to the mutable pixel at location <code>(x, y)</code></p>
|
||
|
<h1 id="panics-1" class="section-header"><a href="#panics-1">Panics</a></h1>
|
||
|
<p>Panics if <code>(x, y)</code> is out of the bounds <code>(width, height)</code>.</p>
|
||
|
</div><h4 id='method.put_pixel' class="method"><code id='put_pixel.v'>pub fn <a href='#method.put_pixel' class='fnname'>put_pixel</a>(&mut self, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, pixel: P)</code><a class='srclink' href='../src/image/buffer.rs.html#497-499' title='goto source code'>[src]</a></h4><div class='docblock'><p>Puts a pixel at location <code>(x, y)</code></p>
|
||
|
<h1 id="panics-2" class="section-header"><a href="#panics-2">Panics</a></h1>
|
||
|
<p>Panics if <code>(x, y)</code> is out of the bounds <code>(width, height)</code>.</p>
|
||
|
</div></div><h3 id='impl-2' class='impl'><code class='in-band'>impl<P, Container> <a class="struct" href="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><P, Container> <span class="where fmt-newline">where<br> P: <a class="trait" href="../image/trait.Pixel.html" title="trait image::Pixel">Pixel</a><Subpixel = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>> + 'static,<br> Container: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a><Target = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>>, </span></code><a href='#impl-2' class='anchor'></a><a class='srclink' href='../src/image/buffer.rs.html#502-524' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.save' class="method"><code id='save.v'>pub fn <a href='#method.save' class='fnname'>save</a><Q>(&self, path: Q) -> <a class="type" href="https://doc.rust-lang.org/nightly/std/io/error/type.Result.html" title="type std::io::error::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>> <span class="where fmt-newline">where<br> Q: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="https://doc.rust-lang.org/nightly/std/path/struct.Path.html" title="struct std::path::Path">Path</a>>, </span></code><a class='srclink' href='../src/image/buffer.rs.html#511-523' title='goto source code'>[src]</a></h4><div class='docblock'><p>Saves the buffer to a file at the path specified.</p>
|
||
|
<p>The image format is derived from the file extension.
|
||
|
Currently only jpeg and png files are supported.</p>
|
||
|
</div></div><h3 id='impl-3' class='impl'><code class='in-band'>impl<P: <a class="trait" href="../image/trait.Pixel.html" title="trait image::Pixel">Pixel</a> + 'static> <a class="struct" href="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><P, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>>> <span class="where fmt-newline">where<br> P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>: 'static, </span></code><a href='#impl-3' class='anchor'></a><a class='srclink' href='../src/image/buffer.rs.html#664-730' 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>(width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="struct" href="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><P, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>>></code><a class='srclink' href='../src/image/buffer.rs.html#673-682' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a new image buffer based on a <code>Vec<P::Subpixel></code>.</p>
|
||
|
<h1 id="panics-3" class="section-header"><a href="#panics-3">Panics</a></h1>
|
||
|
<p>Panics when the resulting image is larger the the maximum size of a vector.</p>
|
||
|
</div><h4 id='method.from_pixel' class="method"><code id='from_pixel.v'>pub fn <a href='#method.from_pixel' class='fnname'>from_pixel</a>(<br> width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br> height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br> pixel: P<br>) -> <a class="struct" href="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><P, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>>></code><a class='srclink' href='../src/image/buffer.rs.html#689-695' title='goto source code'>[src]</a></h4><div class='docblock'><p>Constructs a new ImageBuffer by copying a pixel</p>
|
||
|
<h1 id="panics-4" class="section-header"><a href="#panics-4">Panics</a></h1>
|
||
|
<p>Panics when the resulting image is larger the the maximum size of a vector.</p>
|
||
|
</div><h4 id='method.from_fn' class="method"><code id='from_fn.v'>pub fn <a href='#method.from_fn' class='fnname'>from_fn</a><F>(<br> width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br> height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br> f: F<br>) -> <a class="struct" href="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><P, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>>> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> P, </span></code><a class='srclink' href='../src/image/buffer.rs.html#704-713' title='goto source code'>[src]</a></h4><div class='docblock'><p>Constructs a new ImageBuffer by repeated application of the supplied function.</p>
|
||
|
<p>The arguments to the function are the pixel's x and y coordinates.</p>
|
||
|
<h1 id="panics-5" class="section-header"><a href="#panics-5">Panics</a></h1>
|
||
|
<p>Panics when the resulting image is larger the the maximum size of a vector.</p>
|
||
|
</div><h4 id='method.from_vec' class="method"><code id='from_vec.v'>pub fn <a href='#method.from_vec' class='fnname'>from_vec</a>(<br> width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br> height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br> buf: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>><br>) -> <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="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><P, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>>>></code><a class='srclink' href='../src/image/buffer.rs.html#717-723' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates an image buffer out of an existing buffer.
|
||
|
Returns None if the buffer is not big enough.</p>
|
||
|
</div><h4 id='method.into_vec' class="method"><code id='into_vec.v'>pub fn <a href='#method.into_vec' class='fnname'>into_vec</a>(self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>></code><a class='srclink' href='../src/image/buffer.rs.html#727-729' title='goto source code'>[src]</a></h4><div class='docblock'><p>Consumes the image buffer and returns the underlying data
|
||
|
as an owned buffer</p>
|
||
|
</div></div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-ConvertBuffer%3CImageBuffer%3CToType%2C%20Vec%3C%3CToType%20as%20Pixel%3E%3A%3ASubpixel%3E%3E%3E' class='impl'><code class='in-band'>impl<'a, 'b, Container, FromType: <a class="trait" href="../image/trait.Pixel.html" title="trait image::Pixel">Pixel</a> + 'static, ToType: <a class="trait" href="../image/trait.Pixel.html" title="trait image::Pixel">Pixel</a> + 'static> <a class="trait" href="../image/trait.ConvertBuffer.html" title="trait image::ConvertBuffer">ConvertBuffer</a><<a class="struct" href="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><ToType, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<ToType as <a class="trait" href="../image/trait.Pixel.html" title="trait image::Pixel">Pixel</a>>::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>>>> for <a class="struct" href="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><FromType, Container> <span class="where fmt-newline">where<br> Container: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a><Target = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a>FromType::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>>,<br> ToType: FromColor<FromType>,<br> FromType::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>: 'static,<br> ToType::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>: 'static, </span></code><a href='#impl-ConvertBuffer%3CImageBuffer%3CToType%2C%20Vec%3C%3CToType%20as%20Pixel%3E%3A%3ASubpixel%3E%3E%3E' class='anchor'></a><a class='srclink' href='../src/image/buffer.rs.html#779-795' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.convert' class="method hidden"><code id='convert.v'>fn <a href='../image/trait.ConvertBuffer.html#tymethod.convert' class='fnname'>convert</a>(&self) -> <a class="struct" href="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><ToType, <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><ToType::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>>></code><a class='srclink' href='../src/image/buffer.rs.html#787-794' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Converts <code>self</code> to a buffer of type T <a href="../image/trait.ConvertBuffer.html#tymethod.convert">Read more</a></p>
|
||
|
</div></div><h3 id='impl-GenericImageView' class='impl'><code class='in-band'>impl<P, Container> <a class="trait" href="../image/trait.GenericImageView.html" title="trait image::GenericImageView">GenericImageView</a> for <a class="struct" href="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><P, Container> <span class="where fmt-newline">where<br> P: <a class="trait" href="../image/trait.Pixel.html" title="trait image::Pixel">Pixel</a> + 'static,<br> Container: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a><Target = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a>P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>,<br> P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>: 'static, </span></code><a href='#impl-GenericImageView' class='anchor'></a><a class='srclink' href='../src/image/buffer.rs.html#589-620' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Pixel' class="type"><code id='Pixel.t'>type <a href='../image/trait.GenericImageView.html#associatedtype.Pixel' class="type">Pixel</a> = P</code></h4><div class='docblock'><p>The type of pixel.</p>
|
||
|
</div><h4 id='associatedtype.InnerImageView' class="type"><code id='InnerImageView.t'>type <a href='../image/trait.GenericImageView.html#associatedtype.InnerImageView' class="type">InnerImageView</a> = Self</code></h4><div class='docblock'><p>Underlying image type. This is mainly used by SubImages in order to always have a reference to the original image. This allows for less indirections and it eases the use of nested SubImages. <a href="../image/trait.GenericImageView.html#associatedtype.InnerImageView">Read more</a></p>
|
||
|
</div><h4 id='method.dimensions-1' class="method hidden"><code id='dimensions.v-1'>fn <a href='../image/trait.GenericImageView.html#tymethod.dimensions' class='fnname'>dimensions</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/image/buffer.rs.html#598-600' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>The width and height of this image.</p>
|
||
|
</div><h4 id='method.bounds' class="method hidden"><code id='bounds.v'>fn <a href='../image/trait.GenericImageView.html#tymethod.bounds' class='fnname'>bounds</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/image/buffer.rs.html#602-604' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>The bounding rectangle of this image.</p>
|
||
|
</div><h4 id='method.get_pixel-1' class="method hidden"><code id='get_pixel.v-1'>fn <a href='../image/trait.GenericImageView.html#tymethod.get_pixel' class='fnname'>get_pixel</a>(&self, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> P</code><a class='srclink' href='../src/image/buffer.rs.html#606-608' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns the pixel located at (x, y) <a href="../image/trait.GenericImageView.html#tymethod.get_pixel">Read more</a></p>
|
||
|
</div><h4 id='method.unsafe_get_pixel' class="method"><code id='unsafe_get_pixel.v'>unsafe fn <a href='../image/trait.GenericImageView.html#method.unsafe_get_pixel' class='fnname'>unsafe_get_pixel</a>(&self, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> P</code><a class='srclink' href='../src/image/buffer.rs.html#612-615' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the pixel located at (x, y), ignoring bounds checking.</p>
|
||
|
</div><h4 id='method.inner' class="method hidden"><code id='inner.v'>fn <a href='../image/trait.GenericImageView.html#tymethod.inner' class='fnname'>inner</a>(&self) -> &Self::<a class="type" href="../image/trait.GenericImageView.html#associatedtype.InnerImageView" title="type image::GenericImageView::InnerImageView">InnerImageView</a></code><a class='srclink' href='../src/image/buffer.rs.html#617-619' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a reference to the underlying image.</p>
|
||
|
</div><h4 id='method.width-1' class="method hidden"><code id='width.v-1'>fn <a href='../image/trait.GenericImageView.html#method.width' class='fnname'>width</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a class='srclink' href='../src/image/image.rs.html#556-559' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>The width of this image.</p>
|
||
|
</div><h4 id='method.height-1' class="method hidden"><code id='height.v-1'>fn <a href='../image/trait.GenericImageView.html#method.height' class='fnname'>height</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a class='srclink' href='../src/image/image.rs.html#562-565' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>The height of this image.</p>
|
||
|
</div><h4 id='method.in_bounds' class="method hidden"><code id='in_bounds.v'>fn <a href='../image/trait.GenericImageView.html#method.in_bounds' class='fnname'>in_bounds</a>(&self, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/image/image.rs.html#571-574' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns true if this x, y coordinate is contained inside the image.</p>
|
||
|
</div><h4 id='method.pixels-1' class="method hidden"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../image/struct.Pixels.html" title="struct image::Pixels">Pixels</a><'a, I></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../image/struct.Pixels.html" title="struct image::Pixels">Pixels</a><'a, I></h3><code class="content"><span class="where fmt-newline">impl<'a, I: <a class="trait" href="../image/trait.GenericImageView.html" title="trait image::GenericImageView">GenericImageView</a>> <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="../image/struct.Pixels.html" title="struct image::Pixels">Pixels</a><'a, I></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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, I::<a class="type" href="../image/trait.GenericImageView.html#associatedtype.Pixel" title="type image::GenericImageView::Pixel">Pixel</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span></code></div></div><code id='pixels.v-1'>fn <a href='../image/trait.GenericImageView.html#method.pixels' class='fnname'>pixels</a>(&self) -> <a class="struct" href="../image/struct.Pixels.html" title="struct image::Pixels">Pixels</a><Self></code><a class='srclink' href='../src/image/image.rs.html#595-605' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns an Iterator over the pixels of this image. The iterator yields the coordinates of each pixel along with their value <a href="../image/trait.GenericImageView.html#method.pixels">Read more</a></p>
|
||
|
</div><h4 id='method.view' class="method hidden"><code id='view.v'>fn <a href='../image/trait.GenericImageView.html#method.view' class='fnname'>view</a>(<br> &self, <br> x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br> y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br> width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br> height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a><br>) -> <a class="struct" href="../image/struct.SubImage.html" title="struct image::SubImage">SubImage</a><&Self::<a class="type" href="../image/trait.GenericImageView.html#associatedtype.InnerImageView" title="type image::GenericImageView::InnerImageView">InnerImageView</a>></code><a class='srclink' href='../src/image/image.rs.html#611-613' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns an subimage that is an immutable view into this image.</p>
|
||
|
</div></div><h3 id='impl-GenericImage' class='impl'><code class='in-band'>impl<P, Container> <a class="trait" href="../image/trait.GenericImage.html" title="trait image::GenericImage">GenericImage</a> for <a class="struct" href="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><P, Container> <span class="where fmt-newline">where<br> P: <a class="trait" href="../image/trait.Pixel.html" title="trait image::Pixel">Pixel</a> + 'static,<br> Container: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a><Target = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a>P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a>,<br> P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>: 'static, </span></code><a href='#impl-GenericImage' class='anchor'></a><a class='srclink' href='../src/image/buffer.rs.html#622-656' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.InnerImage' class="type"><code id='InnerImage.t'>type <a href='../image/trait.GenericImage.html#associatedtype.InnerImage' class="type">InnerImage</a> = Self</code></h4><div class='docblock'><p>Underlying image type. This is mainly used by SubImages in order to always have a reference to the original image. This allows for less indirections and it eases the use of nested SubImages. <a href="../image/trait.GenericImage.html#associatedtype.InnerImage">Read more</a></p>
|
||
|
</div><h4 id='method.get_pixel_mut-1' class="method hidden"><code id='get_pixel_mut.v-1'>fn <a href='../image/trait.GenericImage.html#tymethod.get_pixel_mut' class='fnname'>get_pixel_mut</a>(&mut self, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>P</code><a class='srclink' href='../src/image/buffer.rs.html#630-632' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets a reference to the mutable pixel at location <code>(x, y)</code> <a href="../image/trait.GenericImage.html#tymethod.get_pixel_mut">Read more</a></p>
|
||
|
</div><h4 id='method.put_pixel-1' class="method hidden"><code id='put_pixel.v-1'>fn <a href='../image/trait.GenericImage.html#tymethod.put_pixel' class='fnname'>put_pixel</a>(&mut self, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, pixel: P)</code><a class='srclink' href='../src/image/buffer.rs.html#634-636' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Put a pixel at location (x, y) <a href="../image/trait.GenericImage.html#tymethod.put_pixel">Read more</a></p>
|
||
|
</div><h4 id='method.unsafe_put_pixel' class="method"><code id='unsafe_put_pixel.v'>unsafe fn <a href='../image/trait.GenericImage.html#method.unsafe_put_pixel' class='fnname'>unsafe_put_pixel</a>(&mut self, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, pixel: P)</code><a class='srclink' href='../src/image/buffer.rs.html#640-644' title='goto source code'>[src]</a></h4><div class='docblock'><p>Puts a pixel at location (x, y), ignoring bounds checking.</p>
|
||
|
</div><h4 id='method.blend_pixel' class="method"><code id='blend_pixel.v'>fn <a href='../image/trait.GenericImage.html#tymethod.blend_pixel' class='fnname'>blend_pixel</a>(&mut self, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, p: P)</code><a class='srclink' href='../src/image/buffer.rs.html#649-651' title='goto source code'>[src]</a></h4><div class='docblock'><p>Put a pixel at location (x, y), taking into account alpha channels</p>
|
||
|
<p>DEPRECATED: This method will be removed. Blend the pixel directly instead.</p>
|
||
|
</div><h4 id='method.inner_mut' class="method hidden"><code id='inner_mut.v'>fn <a href='../image/trait.GenericImage.html#tymethod.inner_mut' class='fnname'>inner_mut</a>(&mut self) -> &mut Self::<a class="type" href="../image/trait.GenericImage.html#associatedtype.InnerImage" title="type image::GenericImage::InnerImage">InnerImage</a></code><a class='srclink' href='../src/image/buffer.rs.html#653-655' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a mutable reference to the underlying image.</p>
|
||
|
</div><h4 id='method.pixels_mut-1' class="method hidden"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../image/struct.MutPixels.html" title="struct image::MutPixels">MutPixels</a><'a, I></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../image/struct.MutPixels.html" title="struct image::MutPixels">MutPixels</a><'a, I></h3><code class="content"><span class="where fmt-newline">impl<'a, I: <a class="trait" href="../image/trait.GenericImage.html" title="trait image::GenericImage">GenericImage</a> + 'a> <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="../image/struct.MutPixels.html" title="struct image::MutPixels">MutPixels</a><'a, I> <span class="where fmt-newline">where<br> I::<a class="type" href="../image/trait.GenericImageView.html#associatedtype.Pixel" title="type image::GenericImageView::Pixel">Pixel</a>: 'a,<br> <I::<a class="type" href="../image/trait.GenericImageView.html#associatedtype.Pixel" title="type image::GenericImageView::Pixel">Pixel</a> as <a class="trait" href="../image/trait.Pixel.html" title="trait image::Pixel">Pixel</a>>::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>: 'a, </span></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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, &'a mut I::<a class="type" href="../image/trait.GenericImageView.html#associatedtype.Pixel" title="type image::GenericImageView::Pixel">Pixel</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span></code></div></div><code id='pixels_mut.v-1'>fn <a href='../image/trait.GenericImage.html#method.pixels_mut' class='fnname'>pixels_mut</a>(&mut self) -> <a class="struct" href="../image/struct.MutPixels.html" title="struct image::MutPixels">MutPixels</a><Self></code><a class='srclink' href='../src/image/image.rs.html#655-665' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab deprecated'>Deprecated: <p>This cannot be implemented safely in Rust. Please use the image buffer directly.</p>
|
||
|
</div></div><div class='docblock hidden'><p>Returns an Iterator over mutable pixels of this image. The iterator yields the coordinates of each pixel along with a mutable reference to them. <a href="../image/trait.GenericImage.html#method.pixels_mut">Read more</a></p>
|
||
|
</div><h4 id='method.copy_from' class="method hidden"><code id='copy_from.v'>fn <a href='../image/trait.GenericImage.html#method.copy_from' class='fnname'>copy_from</a><O>(&mut self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>O, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> <span class="where fmt-newline">where<br> O: <a class="trait" href="../image/trait.GenericImageView.html" title="trait image::GenericImageView">GenericImageView</a><Pixel = Self::<a class="type" href="../image/trait.GenericImageView.html#associatedtype.Pixel" title="type image::GenericImageView::Pixel">Pixel</a>>, </span></code><a class='srclink' href='../src/image/image.rs.html#677-694' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Copies all of the pixels from another image into this image. <a href="../image/trait.GenericImage.html#method.copy_from">Read more</a></p>
|
||
|
</div><h4 id='method.sub_image' class="method hidden"><code id='sub_image.v'>fn <a href='../image/trait.GenericImage.html#method.sub_image' class='fnname'>sub_image</a>(<br> &mut self, <br> x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br> y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br> width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br> height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a><br>) -> <a class="struct" href="../image/struct.SubImage.html" title="struct image::SubImage">SubImage</a><&mut Self::<a class="type" href="../image/trait.GenericImage.html#associatedtype.InnerImage" title="type image::GenericImage::InnerImage">InnerImage</a>></code><a class='srclink' href='../src/image/image.rs.html#700-708' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a subimage that is a view into this image.</p>
|
||
|
</div></div><h3 id='impl-Clone' class='impl'><code class='in-band'>impl<P, Container> <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="struct" href="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><P, Container> <span class="where fmt-newline">where<br> P: <a class="trait" href="../image/trait.Pixel.html" title="trait image::Pixel">Pixel</a>,<br> Container: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a><Target = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a>P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../src/image/buffer.rs.html#574-587' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code id='clone.v'>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> <a class="struct" href="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><P, Container></code><a class='srclink' href='../src/image/buffer.rs.html#579-586' title='goto source code'>[src]</a></h4><div class='docblock hidden'><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 hidden"><code id='clone_from.v'>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: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#131-133' title='goto source code'>[src]</a></h4><div class='docblock hidden'><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 id='impl-DerefMut' class='impl'><code class='in-band'>impl<P, Container> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a> for <a class="struct" href="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><P, Container> <span class="where fmt-newline">where<br> P: <a class="trait" href="../image/trait.Pixel.html" title="trait image::Pixel">Pixel</a> + 'static,<br> P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>: 'static,<br> Container: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a><Target = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a>P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a>, </span></code><a href='#impl-DerefMut' class='anchor'></a><a class='srclink' href='../src/image/buffer.rs.html#539-548' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.deref_mut' class="method hidden"><code id='deref_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html#tymethod.deref_mut' class='fnname'>deref_mut</a>(&mut self) -> &mut Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target" title="type core::ops::deref::Deref::Target">Target</a></code><a class='srclink' href='../src/image/buffer.rs.html#545-547' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably dereferences the value.</p>
|
||
|
</div></div><h3 id='impl-Deref' class='impl'><code class='in-band'>impl<P, Container> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a> for <a class="struct" href="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><P, Container> <span class="where fmt-newline">where<br> P: <a class="trait" href="../image/trait.Pixel.html" title="trait image::Pixel">Pixel</a> + 'static,<br> P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>: 'static,<br> Container: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a><Target = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a>P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>>, </span></code><a href='#impl-Deref' class='anchor'></a><a class='srclink' href='../src/image/buffer.rs.html#526-537' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Target' class="type"><code id='Target.t'>type <a href='https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target' class="type">Target</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a>P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code></h4><div class='docblock'><p>The resulting type after dereferencing.</p>
|
||
|
</div><h4 id='method.deref' class="method hidden"><code id='deref.v'>fn <a href='https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#tymethod.deref' class='fnname'>deref</a>(&self) -> &Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target" title="type core::ops::deref::Deref::Target">Target</a></code><a class='srclink' href='../src/image/buffer.rs.html#534-536' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Dereferences the value.</p>
|
||
|
</div></div><h3 id='impl-Index%3C(u32%2C%20u32)%3E' class='impl'><code class='in-band'>impl<P, Container> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>> for <a class="struct" href="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><P, Container> <span class="where fmt-newline">where<br> P: <a class="trait" href="../image/trait.Pixel.html" title="trait image::Pixel">Pixel</a> + 'static,<br> P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>: 'static,<br> Container: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a><Target = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a>P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>>, </span></code><a href='#impl-Index%3C(u32%2C%20u32)%3E' class='anchor'></a><a class='srclink' href='../src/image/buffer.rs.html#550-561' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Output' class="type"><code id='Output.t'>type <a href='https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output' class="type">Output</a> = P</code></h4><div class='docblock'><p>The returned type after indexing.</p>
|
||
|
</div><h4 id='method.index' class="method hidden"><code id='index.v'>fn <a href='https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index' class='fnname'>index</a>(&self, (x, y): <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>P</code><a class='srclink' href='../src/image/buffer.rs.html#558-560' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the indexing (<code>container[index]</code>) operation.</p>
|
||
|
</div></div><h3 id='impl-IndexMut%3C(u32%2C%20u32)%3E' class='impl'><code class='in-band'>impl<P, Container> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>> for <a class="struct" href="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><P, Container> <span class="where fmt-newline">where<br> P: <a class="trait" href="../image/trait.Pixel.html" title="trait image::Pixel">Pixel</a> + 'static,<br> P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a>: 'static,<br> Container: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a><Target = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a>P::<a class="type" href="../image/trait.Pixel.html#associatedtype.Subpixel" title="type image::Pixel::Subpixel">Subpixel</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a>, </span></code><a href='#impl-IndexMut%3C(u32%2C%20u32)%3E' class='anchor'></a><a class='srclink' href='../src/image/buffer.rs.html#563-572' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.index_mut' class="method hidden"><code id='index_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html#tymethod.index_mut' class='fnname'>index_mut</a>(&mut self, (x, y): <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>P</code><a class='srclink' href='../src/image/buffer.rs.html#569-571' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the mutable indexing (<code>container[index]</code>) operation.</p>
|
||
|
</div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl<P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="../image/trait.Pixel.html" title="trait image::Pixel">Pixel</a>, Container: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>> <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="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><P, Container></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../src/image/buffer.rs.html#298' 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, f: &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/image/buffer.rs.html#298' 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<P, Container> <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="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><P, Container> <span class="where fmt-newline">where<br> Container: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>, </span></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<P, Container> <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="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><P, Container> <span class="where fmt-newline">where<br> Container: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>, </span></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<P, Container> <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="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><P, Container> <span class="where fmt-newline">where<br> Container: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>, </span></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<P, Container> <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="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><P, Container> <span class="where fmt-newline">where<br> Container: <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>,<br> P: <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a>, </span></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<P, Container> <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="../image/struct.ImageBuffer.html" title="struct image::ImageBuffer">ImageBuffer</a><P, Container> <span class="where fmt-newline">where<br> Container: <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a>,<br> P: <a
|
||
|
</div><h4 id='method.to_owned' class="method hidden"><code id='to_owned.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned' class='fnname'>to_owned</a>(&self) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
|
||
|
</div><h4 id='method.clone_into' class="method hidden"><code id='clone_into.v'>fn <a href='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into' class='fnname'>clone_into</a>(&self, target: <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/alloc/borrow.rs.html#89-91' title='goto source code'>[src]</a></h4><div class='stability hidden'><div class='stab unstable'><details><summary><span class='emoji'>🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p>
|
||
|
</details></div></div><div class='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
|
||
|
</div></div><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-SetParameter' class='impl'><code class='in-band'>impl<T> <a class="trait" href="../gif/traits/trait.SetParameter.html" title="trait gif::traits::SetParameter">SetParameter</a> for T</code><a href='#impl-SetParameter' class='anchor'></a><a class='srclink' href='../src/gif/traits.rs.html#25' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.set' class="method hidden"><code id='set.v'>fn <a href='../gif/traits/trait.SetParameter.html#method.set' class='fnname'>set</a><T>(&mut self, value: T) -> <T as <a class="trait" href="../gif/traits/trait.Parameter.html" title="trait gif::traits::Parameter">Parameter</a><Self>>::<a class="type" href="../gif/traits/trait.Parameter.html#associatedtype.Result" title="type gif::traits::Parameter::Result">Result</a> <span class="where fmt-newline">where<br> T: <a class="trait" href="../gif/traits/trait.Parameter.html" title="trait gif::traits::Parameter">Parameter</a><Self>, </span></code><a class='srclink' href='../src/gif/traits.rs.html#20-22' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Sets <code>value</code> as a parameter of <code>self</code>.</p>
|
||
|
</div></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 = "image";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|