Debian Codegraph @

src/legacy/alt.rs

raw symbols SCIP
1 use craterust-analyzer cargo rgb 0.8.53 crate/::legacyrust-analyzer cargo rgb 0.8.53 legacy/::internalrust-analyzer cargo rgb 0.8.53 legacy/internal/::pixelrust-analyzer cargo rgb 0.8.53 legacy/internal/pixel/::{ComponentMaprust-analyzer cargo rgb 0.8.53 legacy/internal/pixel/ComponentMap#, ColorComponentMaprust-analyzer cargo rgb 0.8.53 legacy/internal/pixel/ColorComponentMap#};
2 #[allow(deprecated)]
3 use craterust-analyzer cargo rgb 0.8.53 crate/::legacyrust-analyzer cargo rgb 0.8.53 legacy/::internalrust-analyzer cargo rgb 0.8.53 legacy/internal/::pixelrust-analyzer cargo rgb 0.8.53 legacy/internal/pixel/::ComponentSlicerust-analyzer cargo rgb 0.8.53 legacy/internal/pixel/ComponentSlice#;
4 use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::slicerust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/;
5
6 pub use craterust-analyzer cargo rgb 0.8.53 crate/::formatsrust-analyzer cargo rgb 0.8.53 formats/::grayrust-analyzer cargo rgb 0.8.53 formats/gray/::Gray_v08rust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08# as Grayrust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#;
7 pub use craterust-analyzer cargo rgb 0.8.53 crate/::formatsrust-analyzer cargo rgb 0.8.53 formats/::gray_alpharust-analyzer cargo rgb 0.8.53 formats/gray_alpha/::GrayAlpha_v08rust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08# as GrayAlpharust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#;
8
9 /// Renamed to `Bgra`
10 #[doc(hidden)]
11 pub use craterust-analyzer cargo rgb 0.8.53 crate/::formatsrust-analyzer cargo rgb 0.8.53 formats/::bgrarust-analyzer cargo rgb 0.8.53 formats/bgra/::Bgrarust-analyzer cargo rgb 0.8.53 formats/bgra/Bgra# as BGRArust-analyzer cargo rgb 0.8.53 formats/bgra/Bgra#;
12
13 /// Renamed to `Bgr`
14 #[doc(hidden)]
15 pub use craterust-analyzer cargo rgb 0.8.53 crate/::formatsrust-analyzer cargo rgb 0.8.53 formats/::bgrrust-analyzer cargo rgb 0.8.53 formats/bgr/::Bgrrust-analyzer cargo rgb 0.8.53 formats/bgr/Bgr# as BGRrust-analyzer cargo rgb 0.8.53 formats/bgr/Bgr#;
16
17 /// Renamed to `Abgr`
18 #[doc(hidden)]
19 pub use craterust-analyzer cargo rgb 0.8.53 crate/::formatsrust-analyzer cargo rgb 0.8.53 formats/::abgrrust-analyzer cargo rgb 0.8.53 formats/abgr/::Abgrrust-analyzer cargo rgb 0.8.53 formats/abgr/Abgr# as ABGRrust-analyzer cargo rgb 0.8.53 formats/abgr/Abgr#;
20
21 /// Renamed to `Argb`
22 #[doc(hidden)]
23 pub use craterust-analyzer cargo rgb 0.8.53 crate/::formatsrust-analyzer cargo rgb 0.8.53 formats/::argbrust-analyzer cargo rgb 0.8.53 formats/argb/::Argbrust-analyzer cargo rgb 0.8.53 formats/argb/Argb# as ARGBrust-analyzer cargo rgb 0.8.53 formats/argb/Argb#;
24
25 /// Renamed to `Grb`
26 #[doc(hidden)]
27 pub use craterust-analyzer cargo rgb 0.8.53 crate/::formatsrust-analyzer cargo rgb 0.8.53 formats/::grbrust-analyzer cargo rgb 0.8.53 formats/grb/::Grbrust-analyzer cargo rgb 0.8.53 formats/grb/Grb# as GRBrust-analyzer cargo rgb 0.8.53 formats/grb/Grb#;
28
29 /// 8-bit BGR
30 pub type BGR8rust-analyzer cargo rgb 0.8.53 legacy/alt/BGR8# = craterust-analyzer cargo rgb 0.8.53 crate/::formatsrust-analyzer cargo rgb 0.8.53 formats/::bgrrust-analyzer cargo rgb 0.8.53 formats/bgr/::Bgrrust-analyzer cargo rgb 0.8.53 formats/bgr/Bgr#<u8>;
31
32 /// 16-bit BGR in machine's native endian
33 pub type BGR16rust-analyzer cargo rgb 0.8.53 legacy/alt/BGR16# = craterust-analyzer cargo rgb 0.8.53 crate/::formatsrust-analyzer cargo rgb 0.8.53 formats/::bgrrust-analyzer cargo rgb 0.8.53 formats/bgr/::Bgrrust-analyzer cargo rgb 0.8.53 formats/bgr/Bgr#<u16>;
34
35 /// 8-bit BGRA
36 pub type BGRA8rust-analyzer cargo rgb 0.8.53 legacy/alt/BGRA8# = craterust-analyzer cargo rgb 0.8.53 crate/::formatsrust-analyzer cargo rgb 0.8.53 formats/::bgrarust-analyzer cargo rgb 0.8.53 formats/bgra/::Bgrarust-analyzer cargo rgb 0.8.53 formats/bgra/Bgra#<u8>;
37
38 /// 8-bit ABGR, alpha is first. 0 = transparent, 255 = opaque.
39 pub type ABGR8rust-analyzer cargo rgb 0.8.53 legacy/alt/ABGR8# = craterust-analyzer cargo rgb 0.8.53 crate/::formatsrust-analyzer cargo rgb 0.8.53 formats/::abgrrust-analyzer cargo rgb 0.8.53 formats/abgr/::Abgrrust-analyzer cargo rgb 0.8.53 formats/abgr/Abgr#<u8>;
40
41 /// 8-bit ARGB, alpha is first. 0 = transparent, 255 = opaque.
42 pub type ARGB8rust-analyzer cargo rgb 0.8.53 legacy/alt/ARGB8# = craterust-analyzer cargo rgb 0.8.53 crate/::Argbrust-analyzer cargo rgb 0.8.53 formats/argb/Argb#<u8>;
43
44 /// 16-bit BGR in machine's native endian
45 pub type BGRA16rust-analyzer cargo rgb 0.8.53 legacy/alt/BGRA16# = craterust-analyzer cargo rgb 0.8.53 crate/::formatsrust-analyzer cargo rgb 0.8.53 formats/::bgrarust-analyzer cargo rgb 0.8.53 formats/bgra/::Bgrarust-analyzer cargo rgb 0.8.53 formats/bgra/Bgra#<u16>;
46
47 /// 16-bit ABGR in machine's native endian. 0 = transparent, 65535 = opaque.
48 pub type ABGR16rust-analyzer cargo rgb 0.8.53 legacy/alt/ABGR16# = craterust-analyzer cargo rgb 0.8.53 crate/::formatsrust-analyzer cargo rgb 0.8.53 formats/::abgrrust-analyzer cargo rgb 0.8.53 formats/abgr/::Abgrrust-analyzer cargo rgb 0.8.53 formats/abgr/Abgr#<u16>;
49
50 /// 16-bit ARGB in machine's native endian. 0 = transparent, 65535 = opaque.
51 pub type ARGB16rust-analyzer cargo rgb 0.8.53 legacy/alt/ARGB16# = craterust-analyzer cargo rgb 0.8.53 crate/::Argbrust-analyzer cargo rgb 0.8.53 formats/argb/Argb#<u16>;
52
53 /// 8-bit GRB
54 pub type GRB8rust-analyzer cargo rgb 0.8.53 legacy/alt/GRB8# = craterust-analyzer cargo rgb 0.8.53 crate/::formatsrust-analyzer cargo rgb 0.8.53 formats/::grbrust-analyzer cargo rgb 0.8.53 formats/grb/::Grbrust-analyzer cargo rgb 0.8.53 formats/grb/Grb#<u8>;
55
56 /// 8-bit gray
57 #[deprecated(note = "Refer to ::rgb::alt::Gray<u8> directly (this type alias will change in the next major version)")]
58 pub type GRAY8rust-analyzer cargo rgb 0.8.53 legacy/alt/GRAY8# = Grayrust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#<u8>;
59
60 /// 16-bit gray in machine's native endian
61 #[deprecated(note = "Refer to ::rgb::alt::Gray<u16> directly (this type alias will change in the next major version)")]
62 pub type GRAY16rust-analyzer cargo rgb 0.8.53 legacy/alt/GRAY16# = Grayrust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#<u16>;
63
64 /// 8-bit gray with alpha in machine's native endian
65 #[deprecated(note = "Refer to ::rgb::alt::GrayAlpha<u8> directly (this type alias will change in the next major version)")]
66 pub type GRAYA8rust-analyzer cargo rgb 0.8.53 legacy/alt/GRAYA8# = GrayAlpharust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#<u8>;
67
68 /// 16-bit gray with alpha in machine's native endian
69 #[deprecated(note = "Refer to ::rgb::alt::GrayAlpha<u16> directly (this type alias will change in the next major version)")]
70 pub type GRAYA16rust-analyzer cargo rgb 0.8.53 legacy/alt/GRAYA16# = GrayAlpharust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#<u16>;
71
72
73 #[cfg(not(feature = "unstable-experimental"))]
74 impl<T> corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::opsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/::Derefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref# for Grayrust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#<T> {
75 type Target = T;
76
77 #[inline(always)]
78 #[allow(deprecated)]
79 fn deref(&self) -> &T {
80 &selfrust-analyzer cargo rgb 0.8.53 legacy/alt/.0
81 }
82 }
83
84 impl<T: Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy#> Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<T> for Grayrust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#<T> {
85 #[inline(always)]
86 fn fromrust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`Gray<T>`][`From<T>`]from().(component: T) -> Selfrust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`Gray<T>`][`From<T>`] {
87 Selfrust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`Gray<T>`][`From<T>`](component)
88 }
89 }
90
91 impl<T: Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone#, A> GrayAlpharust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#<T, A> {
92 /// Copy `Gray` component out of the `GrayAlpha` struct
93 #[inline(always)]
94 #[allow(deprecated)]
95 pub fn grayrust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`GrayAlpha<T, A>`]gray().(&self) -> Grayrust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#<T> {
96 Grayrust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#(self.0rust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#0..clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone#clone().())
97 }
98 }
99
100 impl<T, A> GrayAlpharust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#<T, A> {
101 /// Provide a mutable view of only `Gray` component (leaving out alpha).
102 #[inline(always)]
103 pub fn gray_mutrust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`GrayAlpha<T, A>`]gray_mut().(&mut self) -> &mut Grayrust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#<T> {
104 unsafe { &mut *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#deref().(self as *mut Selfrust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`GrayAlpha<T, A>`]).castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/mut_ptr/impl#[`*mut T`]cast().() }
105 }
106 }
107
108 impl<T: Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy#, A: Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone#> GrayAlpharust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#<T, A> {
109 /// Create a new `GrayAlpha` with the new alpha value, but same gray value
110 #[doc(hidden)]
111 #[deprecated(note = "use .with_alpha(a) instead; this will become a getter in the future")]
112 pub fn alpharust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`GrayAlpha<T, A>`]alpha().(&self, a: A) -> Selfrust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`GrayAlpha<T, A>`] {
113 self.with_alpharust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`GrayAlpha<T, A>`]with_alpha().(a)
114 }
115
116 /// Create a new `GrayAlpha` with the new alpha value, but same gray value
117 #[inline(always)]
118 #[allow(deprecated)]
119 pub fn with_alpharust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`GrayAlpha<T, A>`]with_alpha().(&self, a: A) -> Selfrust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`GrayAlpha<T, A>`] {
120 Selfrust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`GrayAlpha<T, A>`](self.0rust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#0., a)
121 }
122
123 /// Create a new `GrayAlpha` with a new alpha value created by the callback.
124 #[inline(always)]
125 #[allow(deprecated)]
126 pub fn map_alpharust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`GrayAlpha<T, A>`]map_alpha().<F, B>(&self, f: F) -> GrayAlpharust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#<T, B>
127 where F: FnOncerust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/function/FnOnce#(A) -> B
128 {
129 GrayAlpharust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#(self.0rust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#0., f(self.1rust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#1..clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone#clone().()))
130 }
131
132 /// Create new `GrayAlpha` with the same alpha value, but different `Gray` value
133 #[inline(always)]
134 #[allow(deprecated)]
135 pub fn map_grayrust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`GrayAlpha<T, A>`]map_gray().<F, U, B>(&self, f: F) -> GrayAlpharust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#<U, B>
136 where F: FnOncerust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/function/FnOnce#(T) -> U, U: Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone#, B: Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<A> + Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone# {
137 GrayAlpharust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#(f(self.0rust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#0.), self.1rust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#1..clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone#clone().().intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().())
138 }
139 }
140
141 impl<T: Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy#, B> ComponentMaprust-analyzer cargo rgb 0.8.53 legacy/internal/pixel/ComponentMap#<Grayrust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#<B>, T, B> for Grayrust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#<T> {
142 #[inline(always)]
143 #[allow(deprecated)]
144 fn maprust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`Gray<T>`][`ComponentMap<Gray<B>, T, B>`]map().<F>(&self, mut f: F) -> Grayrust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#<B> where F: FnMutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/function/FnMut#(T) -> B {
145 Grayrust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#(f(self.0rust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#0.))
146 }
147 }
148
149 impl<T: Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy#, B> ColorComponentMaprust-analyzer cargo rgb 0.8.53 legacy/internal/pixel/ColorComponentMap#<Grayrust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#<B>, T, B> for Grayrust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#<T> {
150 #[inline(always)]
151 #[allow(deprecated)]
152 fn map_colorsrust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`Gray<T>`][`ColorComponentMap<Gray<B>, T, B>`]map_colors().<F>(&self, mut f: F) -> Grayrust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#<B> where F: FnMutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/function/FnMut#(T) -> B {
153 Grayrust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#(f(self.0rust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#0.))
154 }
155 }
156
157 impl<T: Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy#, B> ComponentMaprust-analyzer cargo rgb 0.8.53 legacy/internal/pixel/ComponentMap#<GrayAlpharust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#<B>, T, B> for GrayAlpharust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#<T> {
158 #[inline(always)]
159 #[allow(deprecated)]
160 fn maprust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`GrayAlpha<T>`][`ComponentMap<GrayAlpha<B>, T, B>`]map().<F>(&self, mut f: F) -> GrayAlpharust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#<B>
161 where F: FnMutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/function/FnMut#(T) -> B {
162 GrayAlpharust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#(f(self.0rust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#0.), f(self.1rust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#1.))
163 }
164 }
165
166 impl<T: Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy#, A: Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy#, B> ColorComponentMaprust-analyzer cargo rgb 0.8.53 legacy/internal/pixel/ColorComponentMap#<GrayAlpharust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#<B, A>, T, B> for GrayAlpharust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#<T, A> {
167 #[inline(always)]
168 #[allow(deprecated)]
169 fn map_colorsrust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`GrayAlpha<T, A>`][`ColorComponentMap<GrayAlpha<B, A>, T, B>`]map_colors().<F>(&self, mut f: F) -> GrayAlpharust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#<B, A>
170 where F: FnMutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/function/FnMut#(T) -> B {
171 GrayAlpharust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#(f(self.0rust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#0.), self.1rust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#1.)
172 }
173 }
174
175 #[allow(deprecated)]
176 impl<T> ComponentSlicerust-analyzer cargo rgb 0.8.53 legacy/internal/pixel/ComponentSlice#<T> for GrayAlpharust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#<T> {
177 #[inline(always)]
178 fn as_slicerust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`GrayAlpha<T>`][`ComponentSlice<T>`]as_slice().(&self) -> &[T] {
179 unsafe {
180 slicerust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/::from_raw_partsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/raw/from_raw_parts().((self as *const Selfrust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`GrayAlpha<T>`][`ComponentSlice<T>`]).castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/const_ptr/impl#[`*const T`]cast().::<T>(), 2)
181 }
182 }
183
184 #[inline(always)]
185 fn as_mut_slicerust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`GrayAlpha<T>`][`ComponentSlice<T>`]as_mut_slice().(&mut self) -> &mut [T] {
186 unsafe {
187 slicerust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/::from_raw_parts_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/raw/from_raw_parts_mut().((self as *mut Selfrust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`GrayAlpha<T>`][`ComponentSlice<T>`]).castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/mut_ptr/impl#[`*mut T`]cast().::<T>(), 2)
188 }
189 }
190 }
191
192 #[allow(deprecated)]
193 impl<T> ComponentSlicerust-analyzer cargo rgb 0.8.53 legacy/internal/pixel/ComponentSlice#<T> for [GrayAlpharust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#<T>] {
194 #[inline]
195 fn as_slicerust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`[GrayAlpha<T>]`][`ComponentSlice<T>`]as_slice().(&self) -> &[T] {
196 unsafe {
197 slicerust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/::from_raw_partsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/raw/from_raw_parts().(self.as_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]as_ptr().().castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/const_ptr/impl#[`*const T`]cast().(), self.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().2)
198 }
199 }
200
201 #[inline]
202 fn as_mut_slicerust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`[GrayAlpha<T>]`][`ComponentSlice<T>`]as_mut_slice().(&mut self) -> &mut [T] {
203 unsafe {
204 slicerust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/::from_raw_parts_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/raw/from_raw_parts_mut().(self.as_mut_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]as_mut_ptr().().castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/mut_ptr/impl#[`*mut T`]cast().::<T>(), self.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Mul<Self>`]mul().2)
205 }
206 }
207 }
208
209 #[allow(deprecated)]
210 impl<T> ComponentSlicerust-analyzer cargo rgb 0.8.53 legacy/internal/pixel/ComponentSlice#<T> for Grayrust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#<T> {
211 #[inline(always)]
212 #[allow(deprecated)]
213 fn as_slicerust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`Gray<T>`][`ComponentSlice<T>`]as_slice().(&self) -> &[T] {
214 slicerust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/::from_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/raw/from_ref().(&self.0rust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#0.)
215 }
216
217 #[inline(always)]
218 #[allow(deprecated)]
219 fn as_mut_slicerust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`Gray<T>`][`ComponentSlice<T>`]as_mut_slice().(&mut self) -> &mut [T] {
220 slicerust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/::from_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/raw/from_mut().(&mut self.0rust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#0.)
221 }
222 }
223
224 #[allow(deprecated)]
225 impl<T> ComponentSlicerust-analyzer cargo rgb 0.8.53 legacy/internal/pixel/ComponentSlice#<T> for [Grayrust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#<T>] {
226 #[inline]
227 fn as_slicerust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`[Gray<T>]`][`ComponentSlice<T>`]as_slice().(&self) -> &[T] {
228 unsafe {
229 slicerust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/::from_raw_partsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/raw/from_raw_parts().(self.as_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]as_ptr().().castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/const_ptr/impl#[`*const T`]cast().(), self.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().())
230 }
231 }
232
233 #[inline]
234 fn as_mut_slicerust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`[Gray<T>]`][`ComponentSlice<T>`]as_mut_slice().(&mut self) -> &mut [T] {
235 unsafe {
236 slicerust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/::from_raw_parts_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/raw/from_raw_parts_mut().(self.as_mut_ptrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]as_mut_ptr().().castrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ptr/mut_ptr/impl#[`*mut T`]cast().::<T>(), self.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().())
237 }
238 }
239 }
240
241 /// Assumes 255 is opaque
242 impl<T: Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy#> Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<Grayrust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#<T>> for GrayAlpharust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#<T, u8> {
243 #[inline(always)]
244 #[allow(deprecated)]
245 fn fromrust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`GrayAlpha<T, u8>`][`From<Gray<T>>`]from().(other: Grayrust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#<T>) -> Selfrust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`GrayAlpha<T, u8>`][`From<Gray<T>>`] {
246 Selfrust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`GrayAlpha<T, u8>`][`From<Gray<T>>`](other.0rust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#0., 0xFF)
247 }
248 }
249
250 /// Assumes 65535 is opaque
251 impl<T: Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy#> Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<Grayrust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#<T>> for GrayAlpharust-analyzer cargo rgb 0.8.53 formats/gray_alpha/GrayAlpha_v08#<T, u16> {
252 #[inline(always)]
253 #[allow(deprecated)]
254 fn fromrust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`GrayAlpha<T, u16>`][`From<Gray<T>>`]from().(other: Grayrust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#<T>) -> Selfrust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`GrayAlpha<T, u16>`][`From<Gray<T>>`] {
255 Selfrust-analyzer cargo rgb 0.8.53 legacy/alt/impl#[`GrayAlpha<T, u16>`][`From<Gray<T>>`](other.0rust-analyzer cargo rgb 0.8.53 formats/gray/Gray_v08#0., 0xFFFF)
256 }
257 }