pub struct BindGroupLayoutDescriptor {
pub label: Cow<'static, str>,
pub entries: Vec<BindGroupLayoutEntry>,
}Fields§
§label: Cow<'static, str>Debug label of the bind group layout descriptor. This will show up in graphics debuggers for easy identification.
entries: Vec<BindGroupLayoutEntry>Implementations§
Source§impl BindGroupLayoutDescriptor
impl BindGroupLayoutDescriptor
Sourcepub fn new(
label: impl Into<Cow<'static, str>>,
entries: &[BindGroupLayoutEntry],
) -> BindGroupLayoutDescriptor
pub fn new( label: impl Into<Cow<'static, str>>, entries: &[BindGroupLayoutEntry], ) -> BindGroupLayoutDescriptor
Examples found in repository?
examples/shader/gpu_readback.rs (lines 176-185)
171fn init_compute_pipeline(
172 mut commands: Commands,
173 asset_server: Res<AssetServer>,
174 pipeline_cache: Res<PipelineCache>,
175) {
176 let layout = BindGroupLayoutDescriptor::new(
177 "",
178 &BindGroupLayoutEntries::sequential(
179 ShaderStages::COMPUTE,
180 (
181 storage_buffer::<Vec<u32>>(false),
182 texture_storage_2d(TextureFormat::R32Uint, StorageTextureAccess::WriteOnly),
183 ),
184 ),
185 );
186 let shader = asset_server.load(SHADER_ASSET_PATH);
187 let pipeline = pipeline_cache.queue_compute_pipeline(ComputePipelineDescriptor {
188 label: Some("GPU readback compute shader".into()),
189 layout: vec![layout.clone()],
190 shader: shader.clone(),
191 ..default()
192 });
193 commands.insert_resource(ComputePipeline { layout, pipeline });
194}More examples
examples/shader_advanced/compute_mesh.rs (lines 219-232)
214fn init_compute_pipeline(
215 mut commands: Commands,
216 asset_server: Res<AssetServer>,
217 pipeline_cache: Res<PipelineCache>,
218) {
219 let layout = BindGroupLayoutDescriptor::new(
220 "",
221 &BindGroupLayoutEntries::sequential(
222 ShaderStages::COMPUTE,
223 (
224 // offsets
225 uniform_buffer::<DataRanges>(false),
226 // vertices
227 storage_buffer::<Vec<u32>>(false),
228 // indices
229 storage_buffer::<Vec<u32>>(false),
230 ),
231 ),
232 );
233 let shader = asset_server.load(SHADER_ASSET_PATH);
234 let pipeline = pipeline_cache.queue_compute_pipeline(ComputePipelineDescriptor {
235 label: Some("Mesh generation compute shader".into()),
236 layout: vec![layout.clone()],
237 shader: shader.clone(),
238 ..default()
239 });
240 commands.insert_resource(ComputePipeline { layout, pipeline });
241}examples/shader_advanced/manual_material.rs (lines 84-93)
79fn init_image_material_resources(
80 mut commands: Commands,
81 render_device: Res<RenderDevice>,
82 mut bind_group_allocators: ResMut<MaterialBindGroupAllocators>,
83) {
84 let bind_group_layout = BindGroupLayoutDescriptor::new(
85 "image_material_layout",
86 &BindGroupLayoutEntries::sequential(
87 ShaderStages::FRAGMENT,
88 (
89 texture_2d(TextureSampleType::Float { filterable: false }),
90 sampler(SamplerBindingType::NonFiltering),
91 ),
92 ),
93 );
94 let sampler = render_device.create_sampler(&SamplerDescriptor::default());
95 commands.insert_resource(ImageMaterialBindGroupLayout(bind_group_layout.clone()));
96 commands.insert_resource(ImageMaterialBindGroupSampler(sampler));
97
98 bind_group_allocators.insert(
99 TypeId::of::<ImageMaterial>(),
100 MaterialBindGroupAllocator::new(
101 &render_device,
102 "image_material_allocator",
103 None,
104 bind_group_layout,
105 None,
106 ),
107 );
108}examples/shader/compute_shader_game_of_life.rs (lines 179-189)
174fn init_game_of_life_pipeline(
175 mut commands: Commands,
176 asset_server: Res<AssetServer>,
177 pipeline_cache: Res<PipelineCache>,
178) {
179 let texture_bind_group_layout = BindGroupLayoutDescriptor::new(
180 "GameOfLifeImages",
181 &BindGroupLayoutEntries::sequential(
182 ShaderStages::COMPUTE,
183 (
184 texture_storage_2d(TextureFormat::Rgba32Float, StorageTextureAccess::ReadOnly),
185 texture_storage_2d(TextureFormat::Rgba32Float, StorageTextureAccess::WriteOnly),
186 uniform_buffer::<GameOfLifeUniforms>(false),
187 ),
188 ),
189 );
190 let shader = asset_server.load(SHADER_ASSET_PATH);
191 let init_pipeline = pipeline_cache.queue_compute_pipeline(ComputePipelineDescriptor {
192 layout: vec![texture_bind_group_layout.clone()],
193 shader: shader.clone(),
194 entry_point: Some(Cow::from("init")),
195 ..default()
196 });
197 let update_pipeline = pipeline_cache.queue_compute_pipeline(ComputePipelineDescriptor {
198 layout: vec![texture_bind_group_layout.clone()],
199 shader,
200 entry_point: Some(Cow::from("update")),
201 ..default()
202 });
203
204 commands.insert_resource(GameOfLifePipeline {
205 texture_bind_group_layout,
206 init_pipeline,
207 update_pipeline,
208 });
209}examples/shader_advanced/custom_post_processing.rs (lines 182-196)
174fn init_post_process_pipeline(
175 mut commands: Commands,
176 render_device: Res<RenderDevice>,
177 asset_server: Res<AssetServer>,
178 fullscreen_shader: Res<FullscreenShader>,
179 pipeline_cache: Res<PipelineCache>,
180) {
181 // We need to define the bind group layout used for our pipeline
182 let layout = BindGroupLayoutDescriptor::new(
183 "post_process_bind_group_layout",
184 &BindGroupLayoutEntries::sequential(
185 // The layout entries will only be visible in the fragment stage
186 ShaderStages::FRAGMENT,
187 (
188 // The screen texture
189 texture_2d(TextureSampleType::Float { filterable: true }),
190 // The sampler that will be used to sample the screen texture
191 sampler(SamplerBindingType::Filtering),
192 // The settings uniform that will control the effect
193 uniform_buffer::<PostProcessSettings>(true),
194 ),
195 ),
196 );
197 // We can create the sampler here since it won't change at runtime and doesn't depend on the view
198 let sampler = render_device.create_sampler(&SamplerDescriptor::default());
199
200 // Get the shader handle
201 let shader = asset_server.load(SHADER_ASSET_PATH);
202 // This will setup a fullscreen triangle for the vertex state.
203 let vertex_state = fullscreen_shader.to_vertex_state();
204 let pipeline_id = pipeline_cache
205 // This will add the pipeline to the cache and queue its creation
206 .queue_render_pipeline(RenderPipelineDescriptor {
207 label: Some("post_process_pipeline".into()),
208 layout: vec![layout.clone()],
209 vertex: vertex_state,
210 fragment: Some(FragmentState {
211 shader,
212 // Make sure this matches the entry point of your shader.
213 // It can be anything as long as it matches here and in the shader.
214 targets: vec![Some(ColorTargetState {
215 format: TextureFormat::Rgba8UnormSrgb,
216 blend: None,
217 write_mask: ColorWrites::ALL,
218 })],
219 ..default()
220 }),
221 ..default()
222 });
223 commands.insert_resource(PostProcessPipeline {
224 layout,
225 sampler,
226 pipeline_id,
227 });
228}Trait Implementations§
Source§impl Clone for BindGroupLayoutDescriptor
impl Clone for BindGroupLayoutDescriptor
Source§fn clone(&self) -> BindGroupLayoutDescriptor
fn clone(&self) -> BindGroupLayoutDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BindGroupLayoutDescriptor
impl Debug for BindGroupLayoutDescriptor
Source§impl Default for BindGroupLayoutDescriptor
impl Default for BindGroupLayoutDescriptor
Source§fn default() -> BindGroupLayoutDescriptor
fn default() -> BindGroupLayoutDescriptor
Returns the “default value” for a type. Read more
impl Eq for BindGroupLayoutDescriptor
Source§impl Hash for BindGroupLayoutDescriptor
impl Hash for BindGroupLayoutDescriptor
Source§impl PartialEq for BindGroupLayoutDescriptor
impl PartialEq for BindGroupLayoutDescriptor
Source§fn eq(&self, other: &BindGroupLayoutDescriptor) -> bool
fn eq(&self, other: &BindGroupLayoutDescriptor) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BindGroupLayoutDescriptor
Auto Trait Implementations§
impl Freeze for BindGroupLayoutDescriptor
impl RefUnwindSafe for BindGroupLayoutDescriptor
impl Send for BindGroupLayoutDescriptor
impl Sync for BindGroupLayoutDescriptor
impl Unpin for BindGroupLayoutDescriptor
impl UnsafeUnpin for BindGroupLayoutDescriptor
impl UnwindSafe for BindGroupLayoutDescriptor
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
Return the
T ShaderType for self. When used in AsBindGroup
derives, it is safe to assume that all images in self exist.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Brush for T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self to use its UpperHex implementation when
Debug-formatted.Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> FromTemplate for T
impl<T> FromTemplate for T
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T> HitDataExtra for T
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.
Source§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<G> PatchFromTemplate for Gwhere
G: FromTemplate,
impl<G> PatchFromTemplate for Gwhere
G: FromTemplate,
Source§fn patch<F>(func: F) -> TemplatePatch<F, <G as PatchFromTemplate>::Template>
fn patch<F>(func: F) -> TemplatePatch<F, <G as PatchFromTemplate>::Template>
Takes a “patch function”
func, and turns it into a TemplatePatch.Source§impl<T> PatchTemplate for Twhere
T: Template,
impl<T> PatchTemplate for Twhere
T: Template,
Source§fn patch_template<F>(func: F) -> TemplatePatch<F, T>
fn patch_template<F>(func: F) -> TemplatePatch<F, T>
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self, then passes self.deref() into the pipe function.impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().impl<T> Settings for T
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref() only in debug builds, and is erased in release
builds.Source§impl<T> Template for T
impl<T> Template for T
Source§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
Uses this template and the given
entity context to produce a Template::Output.Source§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clones this template. See
Clone.Source§impl<T, U> ToSample<U> for Twhere
U: FromSample<T>,
impl<T, U> ToSample<U> for Twhere
U: FromSample<T>,
fn to_sample_(self) -> U
Source§impl<T> TypeData for T
impl<T> TypeData for T
Source§fn clone_type_data(&self) -> Box<dyn TypeData>
fn clone_type_data(&self) -> Box<dyn TypeData>
Creates a type-erased clone of this value.