pub struct ViewTarget {
pub compositing_space: Option<CompositingSpace>,
/* private fields */
}Fields§
§compositing_space: Option<CompositingSpace>Color space of values stored in the main texture (for blit conversion to output)
Implementations§
Source§impl ViewTarget
impl ViewTarget
pub const TEXTURE_FORMAT_HDR: TextureFormat = TextureFormat::Rgba16Float
Use ExtractedView::target_format where possible. Bevy does not encourage a default HDR TextureFormat anymore. If you really need this, use TextureFormat::Rgba16Float
Sourcepub fn get_color_attachment(&self) -> RenderPassColorAttachment<'_>
pub fn get_color_attachment(&self) -> RenderPassColorAttachment<'_>
Retrieve this target’s main texture’s color attachment.
Examples found in repository?
649fn custom_draw_system(
650 world: &World,
651 view: ViewQuery<(
652 &ExtractedCamera,
653 &ExtractedView,
654 &ViewTarget,
655 Option<&MainPassResolutionOverride>,
656 )>,
657 stencil_phases: Res<ViewSortedRenderPhases<Stencil3d>>,
658 mut ctx: RenderContext,
659) {
660 let view_entity = view.entity();
661 let (camera, extracted_view, target, resolution_override) = view.into_inner();
662
663 let Some(stencil_phase) = stencil_phases.get(&extracted_view.retained_view_entity) else {
664 return;
665 };
666
667 let mut render_pass = ctx.begin_tracked_render_pass(RenderPassDescriptor {
668 label: Some("stencil pass"),
669 // For the purpose of the example, we will write directly to the view target. A real
670 // stencil pass would write to a custom texture and that texture would be used in later
671 // passes to render custom effects using it.
672 color_attachments: &[Some(target.get_color_attachment())],
673 // We don't bind any depth buffer for this pass
674 depth_stencil_attachment: None,
675 timestamp_writes: None,
676 occlusion_query_set: None,
677 multiview_mask: None,
678 });
679
680 if let Some(viewport) =
681 Viewport::from_viewport_and_override(camera.viewport.as_ref(), resolution_override)
682 {
683 render_pass.set_camera_viewport(&viewport);
684 }
685
686 if let Err(err) = stencil_phase.render(&mut render_pass, world, view_entity) {
687 error!("Error encountered while rendering the stencil phase {err:?}");
688 }
689}Sourcepub fn get_unsampled_color_attachment(&self) -> RenderPassColorAttachment<'_>
pub fn get_unsampled_color_attachment(&self) -> RenderPassColorAttachment<'_>
Retrieve this target’s “unsampled” main texture’s color attachment.
Sourcepub fn main_texture(&self) -> &Texture
pub fn main_texture(&self) -> &Texture
The “main” unsampled texture.
Sourcepub fn main_texture_other(&self) -> &Texture
pub fn main_texture_other(&self) -> &Texture
The other “main” unsampled texture.
In most cases you should use Self::main_texture instead and never this.
The textures will naturally be swapped when Self::post_process_write is called.
A use case for this is to be able to prepare a bind group for all main textures ahead of time.
Sourcepub fn main_texture_view(&self) -> &TextureView
pub fn main_texture_view(&self) -> &TextureView
The “main” unsampled texture.
Sourcepub fn main_texture_other_view(&self) -> &TextureView
pub fn main_texture_other_view(&self) -> &TextureView
The other “main” unsampled texture view.
In most cases you should use Self::main_texture_view instead and never this.
The textures will naturally be swapped when Self::post_process_write is called.
A use case for this is to be able to prepare a bind group for all main textures ahead of time.
Sourcepub fn sampled_main_texture(&self) -> Option<&Texture>
pub fn sampled_main_texture(&self) -> Option<&Texture>
The “main” sampled texture.
Sourcepub fn sampled_main_texture_view(&self) -> Option<&TextureView>
pub fn sampled_main_texture_view(&self) -> Option<&TextureView>
The “main” sampled texture view.
Sourcepub fn main_texture_format(&self) -> TextureFormat
pub fn main_texture_format(&self) -> TextureFormat
Currently bevy’s main texture format can be:
- If rendering to screen:
For HDR, it’s
Rgba16Float. For LDR, it’sRgba8UnormwhenCompositingSpace::Srgb, otherwiseRgba8UnormSrgb. - If rendering to texture: the format is the same as texture view’s format.
Sourcepub fn out_texture(&self) -> Option<&TextureView>
pub fn out_texture(&self) -> Option<&TextureView>
The final texture this view will render to.
Sourcepub fn out_texture_color_attachment(
&self,
clear_color: Option<LinearRgba>,
) -> Option<RenderPassColorAttachment<'_>>
pub fn out_texture_color_attachment( &self, clear_color: Option<LinearRgba>, ) -> Option<RenderPassColorAttachment<'_>>
The final texture this view will render to, as a color attachment.
Sourcepub fn needs_present(&self) -> bool
pub fn needs_present(&self) -> bool
Whether the final texture this view will render to needs to be presented.
Sourcepub fn out_texture_view_format(&self) -> Option<TextureFormat>
pub fn out_texture_view_format(&self) -> Option<TextureFormat>
The format of the final texture this view will render to, if any.
Sourcepub fn post_process_write(&self) -> PostProcessWrite<'_>
pub fn post_process_write(&self) -> PostProcessWrite<'_>
This will start a new “post process write”, which assumes that the caller
will write the PostProcessWrite’s source to the destination.
source is the “current” main texture. This will internally flip this
ViewTarget’s main texture to the destination texture, so the caller
must ensure source is copied to destination, with or without modifications.
Failing to do so will cause the current main texture information to be lost.
Examples found in repository?
75fn post_process_system(
76 view: ViewQuery<(
77 &ViewTarget,
78 &PostProcessSettings,
79 &DynamicUniformIndex<PostProcessSettings>,
80 )>,
81 post_process_pipeline: Option<Res<PostProcessPipeline>>,
82 pipeline_cache: Res<PipelineCache>,
83 settings_uniforms: Res<ComponentUniforms<PostProcessSettings>>,
84 mut cache: Local<PostProcessBindGroupCache>,
85 mut ctx: RenderContext,
86) {
87 let Some(post_process_pipeline) = post_process_pipeline else {
88 return;
89 };
90
91 let (view_target, _post_process_settings, settings_index) = view.into_inner();
92
93 let Some(pipeline) = pipeline_cache.get_render_pipeline(post_process_pipeline.pipeline_id)
94 else {
95 return;
96 };
97
98 let Some(settings_binding) = settings_uniforms.uniforms().binding() else {
99 return;
100 };
101
102 // This will start a new "post process write", obtaining two texture
103 // views from the view target - a `source` and a `destination`.
104 // `source` is the "current" main texture and you _must_ write into
105 // `destination` because calling `post_process_write()` on the
106 // [`ViewTarget`] will internally flip the [`ViewTarget`]'s main
107 // texture to the `destination` texture. Failing to do so will cause
108 // the current main texture information to be lost.
109 let post_process = view_target.post_process_write();
110
111 let bind_group = match &mut cache.cached {
112 Some((texture_id, bind_group)) if post_process.source.id() == *texture_id => bind_group,
113 cached => {
114 // The bind_group gets created each frame.
115 //
116 // Normally, you would create a bind_group in the Queue set,
117 // but this doesn't work with the post_process_write().
118 // The reason it doesn't work is because each post_process_write will alternate the source/destination.
119 // The only way to have the correct source/destination for the bind_group
120 // is to make sure you get it during the node execution.
121 let bind_group = ctx.render_device().create_bind_group(
122 "post_process_bind_group",
123 &pipeline_cache.get_bind_group_layout(&post_process_pipeline.layout),
124 // It's important for this to match the BindGroupLayout defined in the PostProcessPipeline
125 &BindGroupEntries::sequential((
126 // Make sure to use the source view
127 post_process.source,
128 // Use the sampler created for the pipeline
129 &post_process_pipeline.sampler,
130 // Set the settings binding
131 settings_binding.clone(),
132 )),
133 );
134
135 let (_, bind_group) = cached.insert((post_process.source.id(), bind_group));
136 bind_group
137 }
138 };
139
140 let mut render_pass = ctx
141 .command_encoder()
142 .begin_render_pass(&RenderPassDescriptor {
143 label: Some("post_process_pass"),
144 color_attachments: &[Some(RenderPassColorAttachment {
145 // We need to specify the post process destination view here
146 // to make sure we write to the appropriate texture.
147 view: post_process.destination,
148 depth_slice: None,
149 resolve_target: None,
150 ops: Operations::default(),
151 })],
152 depth_stencil_attachment: None,
153 timestamp_writes: None,
154 occlusion_query_set: None,
155 multiview_mask: None,
156 });
157
158 render_pass.set_pipeline(pipeline);
159 // By passing in the index of the post process settings on this view, we ensure
160 // that in the event that multiple settings were sent to the GPU (as would be the
161 // case with multiple cameras), we use the correct one.
162 render_pass.set_bind_group(0, bind_group, &[settings_index.index()]);
163 render_pass.draw(0..3, 0..1);
164}Trait Implementations§
Source§impl Clone for ViewTarget
impl Clone for ViewTarget
Source§fn clone(&self) -> ViewTarget
fn clone(&self) -> ViewTarget
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Component for ViewTarget
impl Component for ViewTarget
Source§const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
Source§type Mutability = Mutable
type Mutability = Mutable
Component<Mutability = Mutable>,
while immutable components will instead have Component<Mutability = Immutable>. Read moreSource§fn register_required_components(
_requiree: ComponentId,
required_components: &mut RequiredComponentsRegistrator<'_, '_>,
)
fn register_required_components( _requiree: ComponentId, required_components: &mut RequiredComponentsRegistrator<'_, '_>, )
Source§fn clone_behavior() -> ComponentCloneBehavior
fn clone_behavior() -> ComponentCloneBehavior
Source§fn relationship_accessor() -> Option<ComponentRelationshipAccessor<ViewTarget>>
fn relationship_accessor() -> Option<ComponentRelationshipAccessor<ViewTarget>>
ComponentRelationshipAccessor required for working with relationships in dynamic contexts. Read moreSource§fn on_add() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_add() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn on_insert() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_insert() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn on_discard() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_discard() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn on_remove() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_remove() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn map_entities<E>(_this: &mut Self, _mapper: &mut E)where
E: EntityMapper,
fn map_entities<E>(_this: &mut Self, _mapper: &mut E)where
E: EntityMapper,
EntityMapper. This is used to remap entities in contexts like scenes and entity cloning.
When deriving Component, this is populated by annotating fields containing entities with #[entities] Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ViewTarget
impl !UnwindSafe for ViewTarget
impl Freeze for ViewTarget
impl Send for ViewTarget
impl Sync for ViewTarget
impl Unpin for ViewTarget
impl UnsafeUnpin for ViewTarget
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
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
Source§impl<C> Bundle for Cwhere
C: Component,
impl<C> Bundle for Cwhere
C: Component,
fn component_ids( components: &mut ComponentsRegistrator<'_>, ) -> impl Iterator<Item = ComponentId> + use<C>
Source§fn get_component_ids(
components: &Components,
) -> impl Iterator<Item = Option<ComponentId>>
fn get_component_ids( components: &Components, ) -> impl Iterator<Item = Option<ComponentId>>
Source§impl<C> BundleFromComponents for Cwhere
C: Component,
impl<C> BundleFromComponents for Cwhere
C: Component,
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>
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>
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)
&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)
&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>
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>
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)
&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)
&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<C> DynamicBundle for Cwhere
C: Component,
impl<C> DynamicBundle for Cwhere
C: Component,
Source§unsafe fn get_components(
ptr: MovingPtr<'_, C>,
func: &mut impl FnMut(StorageType, OwningPtr<'_>),
) -> <C as DynamicBundle>::Effect
unsafe fn get_components( ptr: MovingPtr<'_, C>, func: &mut impl FnMut(StorageType, OwningPtr<'_>), ) -> <C as DynamicBundle>::Effect
Source§unsafe fn apply_effect(
_ptr: MovingPtr<'_, MaybeUninit<C>>,
_entity: &mut EntityWorldMut<'_>,
)
unsafe fn apply_effect( _ptr: MovingPtr<'_, MaybeUninit<C>>, _entity: &mut EntityWorldMut<'_>, )
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,
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,
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,
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,
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,
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,
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,
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,
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, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
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
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> ⓘ
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> ⓘ
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>
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<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,
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,
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,
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
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
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
self, then passes self.deref() into the pipe function.impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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
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
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
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
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
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
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
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
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
.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
.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
.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
.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
.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
.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
.tap_deref() only in debug builds, and is erased in release
builds.