Struct bevy::sprite::Mesh2dPipelineKey
pub struct Mesh2dPipelineKey(/* private fields */);
Implementations§
§impl Mesh2dPipelineKey
impl Mesh2dPipelineKey
pub const NONE: Mesh2dPipelineKey = _
pub const HDR: Mesh2dPipelineKey = _
pub const TONEMAP_IN_SHADER: Mesh2dPipelineKey = _
pub const DEBAND_DITHER: Mesh2dPipelineKey = _
pub const MSAA_RESERVED_BITS: Mesh2dPipelineKey = _
pub const PRIMITIVE_TOPOLOGY_RESERVED_BITS: Mesh2dPipelineKey = _
pub const TONEMAP_METHOD_RESERVED_BITS: Mesh2dPipelineKey = _
pub const TONEMAP_METHOD_NONE: Mesh2dPipelineKey = _
pub const TONEMAP_METHOD_REINHARD: Mesh2dPipelineKey = _
pub const TONEMAP_METHOD_REINHARD_LUMINANCE: Mesh2dPipelineKey = _
pub const TONEMAP_METHOD_ACES_FITTED: Mesh2dPipelineKey = _
pub const TONEMAP_METHOD_AGX: Mesh2dPipelineKey = _
pub const TONEMAP_METHOD_SOMEWHAT_BORING_DISPLAY_TRANSFORM: Mesh2dPipelineKey = _
pub const TONEMAP_METHOD_TONY_MC_MAPFACE: Mesh2dPipelineKey = _
pub const TONEMAP_METHOD_BLENDER_FILMIC: Mesh2dPipelineKey = _
§impl Mesh2dPipelineKey
impl Mesh2dPipelineKey
pub const fn empty() -> Mesh2dPipelineKey
pub const fn empty() -> Mesh2dPipelineKey
Get a flags value with all bits unset.
pub const fn all() -> Mesh2dPipelineKey
pub const fn all() -> Mesh2dPipelineKey
Get a flags value with all known bits set.
pub const fn bits(&self) -> u32
pub const fn bits(&self) -> u32
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
pub const fn from_bits(bits: u32) -> Option<Mesh2dPipelineKey>
pub const fn from_bits(bits: u32) -> Option<Mesh2dPipelineKey>
Convert from a bits value.
This method will return None
if any unknown bits are set.
pub const fn from_bits_truncate(bits: u32) -> Mesh2dPipelineKey
pub const fn from_bits_truncate(bits: u32) -> Mesh2dPipelineKey
Convert from a bits value, unsetting any unknown bits.
pub const fn from_bits_retain(bits: u32) -> Mesh2dPipelineKey
pub const fn from_bits_retain(bits: u32) -> Mesh2dPipelineKey
Convert from a bits value exactly.
pub fn from_name(name: &str) -> Option<Mesh2dPipelineKey>
pub fn from_name(name: &str) -> Option<Mesh2dPipelineKey>
Get a flags value with the bits of a flag with the given name set.
This method will return None
if name
is empty or doesn’t
correspond to any named flag.
pub const fn intersects(&self, other: Mesh2dPipelineKey) -> bool
pub const fn intersects(&self, other: Mesh2dPipelineKey) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
pub const fn contains(&self, other: Mesh2dPipelineKey) -> bool
pub const fn contains(&self, other: Mesh2dPipelineKey) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
Examples found in repository?
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
fn specialize(&self, key: Self::Key) -> RenderPipelineDescriptor {
// Customize how to store the meshes' vertex attributes in the vertex buffer
// Our meshes only have position and color
let formats = vec![
// Position
VertexFormat::Float32x3,
// Color
VertexFormat::Uint32,
];
let vertex_layout =
VertexBufferLayout::from_vertex_formats(VertexStepMode::Vertex, formats);
let format = match key.contains(Mesh2dPipelineKey::HDR) {
true => ViewTarget::TEXTURE_FORMAT_HDR,
false => TextureFormat::bevy_default(),
};
RenderPipelineDescriptor {
vertex: VertexState {
// Use our custom shader
shader: COLORED_MESH2D_SHADER_HANDLE,
entry_point: "vertex".into(),
shader_defs: vec![],
// Use our custom vertex buffer
buffers: vec![vertex_layout],
},
fragment: Some(FragmentState {
// Use our custom shader
shader: COLORED_MESH2D_SHADER_HANDLE,
shader_defs: vec![],
entry_point: "fragment".into(),
targets: vec![Some(ColorTargetState {
format,
blend: Some(BlendState::ALPHA_BLENDING),
write_mask: ColorWrites::ALL,
})],
}),
// Use the two standard uniforms for 2d meshes
layout: vec![
// Bind group 0 is the view uniform
self.mesh2d_pipeline.view_layout.clone(),
// Bind group 1 is the mesh uniform
self.mesh2d_pipeline.mesh_layout.clone(),
],
push_constant_ranges: vec![],
primitive: PrimitiveState {
front_face: FrontFace::Ccw,
cull_mode: Some(Face::Back),
unclipped_depth: false,
polygon_mode: PolygonMode::Fill,
conservative: false,
topology: key.primitive_topology(),
strip_index_format: None,
},
depth_stencil: None,
multisample: MultisampleState {
count: key.msaa_samples(),
mask: !0,
alpha_to_coverage_enabled: false,
},
label: Some("colored_mesh2d_pipeline".into()),
}
}
pub fn insert(&mut self, other: Mesh2dPipelineKey)
pub fn insert(&mut self, other: Mesh2dPipelineKey)
The bitwise or (|
) of the bits in two flags values.
pub fn remove(&mut self, other: Mesh2dPipelineKey)
pub fn remove(&mut self, other: Mesh2dPipelineKey)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
remove
won’t truncate other
, but the !
operator will.
pub fn toggle(&mut self, other: Mesh2dPipelineKey)
pub fn toggle(&mut self, other: Mesh2dPipelineKey)
The bitwise exclusive-or (^
) of the bits in two flags values.
pub fn set(&mut self, other: Mesh2dPipelineKey, value: bool)
pub fn set(&mut self, other: Mesh2dPipelineKey, value: bool)
Call insert
when value
is true
or remove
when value
is false
.
pub const fn intersection(self, other: Mesh2dPipelineKey) -> Mesh2dPipelineKey
pub const fn intersection(self, other: Mesh2dPipelineKey) -> Mesh2dPipelineKey
The bitwise and (&
) of the bits in two flags values.
pub const fn union(self, other: Mesh2dPipelineKey) -> Mesh2dPipelineKey
pub const fn union(self, other: Mesh2dPipelineKey) -> Mesh2dPipelineKey
The bitwise or (|
) of the bits in two flags values.
pub const fn difference(self, other: Mesh2dPipelineKey) -> Mesh2dPipelineKey
pub const fn difference(self, other: Mesh2dPipelineKey) -> Mesh2dPipelineKey
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
pub const fn symmetric_difference(
self,
other: Mesh2dPipelineKey
) -> Mesh2dPipelineKey
pub const fn symmetric_difference( self, other: Mesh2dPipelineKey ) -> Mesh2dPipelineKey
The bitwise exclusive-or (^
) of the bits in two flags values.
pub const fn complement(self) -> Mesh2dPipelineKey
pub const fn complement(self) -> Mesh2dPipelineKey
The bitwise negation (!
) of the bits in a flags value, truncating the result.
§impl Mesh2dPipelineKey
impl Mesh2dPipelineKey
pub const fn iter(&self) -> Iter<Mesh2dPipelineKey>
pub const fn iter(&self) -> Iter<Mesh2dPipelineKey>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
pub const fn iter_names(&self) -> IterNames<Mesh2dPipelineKey>
pub const fn iter_names(&self) -> IterNames<Mesh2dPipelineKey>
Yield a set of contained named flags values.
This method is like iter
, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
§impl Mesh2dPipelineKey
impl Mesh2dPipelineKey
pub fn from_msaa_samples(msaa_samples: u32) -> Mesh2dPipelineKey
pub fn from_msaa_samples(msaa_samples: u32) -> Mesh2dPipelineKey
Examples found in repository?
349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403
pub fn queue_colored_mesh2d(
transparent_draw_functions: Res<DrawFunctions<Transparent2d>>,
colored_mesh2d_pipeline: Res<ColoredMesh2dPipeline>,
mut pipelines: ResMut<SpecializedRenderPipelines<ColoredMesh2dPipeline>>,
pipeline_cache: Res<PipelineCache>,
msaa: Res<Msaa>,
render_meshes: Res<RenderAssets<GpuMesh>>,
render_mesh_instances: Res<RenderColoredMesh2dInstances>,
mut views: Query<(
&VisibleEntities,
&mut SortedRenderPhase<Transparent2d>,
&ExtractedView,
)>,
) {
if render_mesh_instances.is_empty() {
return;
}
// Iterate each view (a camera is a view)
for (visible_entities, mut transparent_phase, view) in &mut views {
let draw_colored_mesh2d = transparent_draw_functions.read().id::<DrawColoredMesh2d>();
let mesh_key = Mesh2dPipelineKey::from_msaa_samples(msaa.samples())
| Mesh2dPipelineKey::from_hdr(view.hdr);
// Queue all entities visible to that view
for visible_entity in visible_entities.iter::<WithMesh2d>() {
if let Some(mesh_instance) = render_mesh_instances.get(visible_entity) {
let mesh2d_handle = mesh_instance.mesh_asset_id;
let mesh2d_transforms = &mesh_instance.transforms;
// Get our specialized pipeline
let mut mesh2d_key = mesh_key;
if let Some(mesh) = render_meshes.get(mesh2d_handle) {
mesh2d_key |=
Mesh2dPipelineKey::from_primitive_topology(mesh.primitive_topology());
}
let pipeline_id =
pipelines.specialize(&pipeline_cache, &colored_mesh2d_pipeline, mesh2d_key);
let mesh_z = mesh2d_transforms.transform.translation.z;
transparent_phase.add(Transparent2d {
entity: *visible_entity,
draw_function: draw_colored_mesh2d,
pipeline: pipeline_id,
// The 2d render items are sorted according to their z value before rendering,
// in order to get correct transparency
sort_key: FloatOrd(mesh_z),
// This material is not batched
batch_range: 0..1,
extra_index: PhaseItemExtraIndex::NONE,
});
}
}
}
}
pub fn from_hdr(hdr: bool) -> Mesh2dPipelineKey
pub fn from_hdr(hdr: bool) -> Mesh2dPipelineKey
Examples found in repository?
349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403
pub fn queue_colored_mesh2d(
transparent_draw_functions: Res<DrawFunctions<Transparent2d>>,
colored_mesh2d_pipeline: Res<ColoredMesh2dPipeline>,
mut pipelines: ResMut<SpecializedRenderPipelines<ColoredMesh2dPipeline>>,
pipeline_cache: Res<PipelineCache>,
msaa: Res<Msaa>,
render_meshes: Res<RenderAssets<GpuMesh>>,
render_mesh_instances: Res<RenderColoredMesh2dInstances>,
mut views: Query<(
&VisibleEntities,
&mut SortedRenderPhase<Transparent2d>,
&ExtractedView,
)>,
) {
if render_mesh_instances.is_empty() {
return;
}
// Iterate each view (a camera is a view)
for (visible_entities, mut transparent_phase, view) in &mut views {
let draw_colored_mesh2d = transparent_draw_functions.read().id::<DrawColoredMesh2d>();
let mesh_key = Mesh2dPipelineKey::from_msaa_samples(msaa.samples())
| Mesh2dPipelineKey::from_hdr(view.hdr);
// Queue all entities visible to that view
for visible_entity in visible_entities.iter::<WithMesh2d>() {
if let Some(mesh_instance) = render_mesh_instances.get(visible_entity) {
let mesh2d_handle = mesh_instance.mesh_asset_id;
let mesh2d_transforms = &mesh_instance.transforms;
// Get our specialized pipeline
let mut mesh2d_key = mesh_key;
if let Some(mesh) = render_meshes.get(mesh2d_handle) {
mesh2d_key |=
Mesh2dPipelineKey::from_primitive_topology(mesh.primitive_topology());
}
let pipeline_id =
pipelines.specialize(&pipeline_cache, &colored_mesh2d_pipeline, mesh2d_key);
let mesh_z = mesh2d_transforms.transform.translation.z;
transparent_phase.add(Transparent2d {
entity: *visible_entity,
draw_function: draw_colored_mesh2d,
pipeline: pipeline_id,
// The 2d render items are sorted according to their z value before rendering,
// in order to get correct transparency
sort_key: FloatOrd(mesh_z),
// This material is not batched
batch_range: 0..1,
extra_index: PhaseItemExtraIndex::NONE,
});
}
}
}
}
pub fn msaa_samples(&self) -> u32
pub fn msaa_samples(&self) -> u32
Examples found in repository?
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
fn specialize(&self, key: Self::Key) -> RenderPipelineDescriptor {
// Customize how to store the meshes' vertex attributes in the vertex buffer
// Our meshes only have position and color
let formats = vec![
// Position
VertexFormat::Float32x3,
// Color
VertexFormat::Uint32,
];
let vertex_layout =
VertexBufferLayout::from_vertex_formats(VertexStepMode::Vertex, formats);
let format = match key.contains(Mesh2dPipelineKey::HDR) {
true => ViewTarget::TEXTURE_FORMAT_HDR,
false => TextureFormat::bevy_default(),
};
RenderPipelineDescriptor {
vertex: VertexState {
// Use our custom shader
shader: COLORED_MESH2D_SHADER_HANDLE,
entry_point: "vertex".into(),
shader_defs: vec![],
// Use our custom vertex buffer
buffers: vec![vertex_layout],
},
fragment: Some(FragmentState {
// Use our custom shader
shader: COLORED_MESH2D_SHADER_HANDLE,
shader_defs: vec![],
entry_point: "fragment".into(),
targets: vec![Some(ColorTargetState {
format,
blend: Some(BlendState::ALPHA_BLENDING),
write_mask: ColorWrites::ALL,
})],
}),
// Use the two standard uniforms for 2d meshes
layout: vec![
// Bind group 0 is the view uniform
self.mesh2d_pipeline.view_layout.clone(),
// Bind group 1 is the mesh uniform
self.mesh2d_pipeline.mesh_layout.clone(),
],
push_constant_ranges: vec![],
primitive: PrimitiveState {
front_face: FrontFace::Ccw,
cull_mode: Some(Face::Back),
unclipped_depth: false,
polygon_mode: PolygonMode::Fill,
conservative: false,
topology: key.primitive_topology(),
strip_index_format: None,
},
depth_stencil: None,
multisample: MultisampleState {
count: key.msaa_samples(),
mask: !0,
alpha_to_coverage_enabled: false,
},
label: Some("colored_mesh2d_pipeline".into()),
}
}
pub fn from_primitive_topology(
primitive_topology: PrimitiveTopology
) -> Mesh2dPipelineKey
pub fn from_primitive_topology( primitive_topology: PrimitiveTopology ) -> Mesh2dPipelineKey
Examples found in repository?
349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403
pub fn queue_colored_mesh2d(
transparent_draw_functions: Res<DrawFunctions<Transparent2d>>,
colored_mesh2d_pipeline: Res<ColoredMesh2dPipeline>,
mut pipelines: ResMut<SpecializedRenderPipelines<ColoredMesh2dPipeline>>,
pipeline_cache: Res<PipelineCache>,
msaa: Res<Msaa>,
render_meshes: Res<RenderAssets<GpuMesh>>,
render_mesh_instances: Res<RenderColoredMesh2dInstances>,
mut views: Query<(
&VisibleEntities,
&mut SortedRenderPhase<Transparent2d>,
&ExtractedView,
)>,
) {
if render_mesh_instances.is_empty() {
return;
}
// Iterate each view (a camera is a view)
for (visible_entities, mut transparent_phase, view) in &mut views {
let draw_colored_mesh2d = transparent_draw_functions.read().id::<DrawColoredMesh2d>();
let mesh_key = Mesh2dPipelineKey::from_msaa_samples(msaa.samples())
| Mesh2dPipelineKey::from_hdr(view.hdr);
// Queue all entities visible to that view
for visible_entity in visible_entities.iter::<WithMesh2d>() {
if let Some(mesh_instance) = render_mesh_instances.get(visible_entity) {
let mesh2d_handle = mesh_instance.mesh_asset_id;
let mesh2d_transforms = &mesh_instance.transforms;
// Get our specialized pipeline
let mut mesh2d_key = mesh_key;
if let Some(mesh) = render_meshes.get(mesh2d_handle) {
mesh2d_key |=
Mesh2dPipelineKey::from_primitive_topology(mesh.primitive_topology());
}
let pipeline_id =
pipelines.specialize(&pipeline_cache, &colored_mesh2d_pipeline, mesh2d_key);
let mesh_z = mesh2d_transforms.transform.translation.z;
transparent_phase.add(Transparent2d {
entity: *visible_entity,
draw_function: draw_colored_mesh2d,
pipeline: pipeline_id,
// The 2d render items are sorted according to their z value before rendering,
// in order to get correct transparency
sort_key: FloatOrd(mesh_z),
// This material is not batched
batch_range: 0..1,
extra_index: PhaseItemExtraIndex::NONE,
});
}
}
}
}
pub fn primitive_topology(&self) -> PrimitiveTopology
pub fn primitive_topology(&self) -> PrimitiveTopology
Examples found in repository?
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
fn specialize(&self, key: Self::Key) -> RenderPipelineDescriptor {
// Customize how to store the meshes' vertex attributes in the vertex buffer
// Our meshes only have position and color
let formats = vec![
// Position
VertexFormat::Float32x3,
// Color
VertexFormat::Uint32,
];
let vertex_layout =
VertexBufferLayout::from_vertex_formats(VertexStepMode::Vertex, formats);
let format = match key.contains(Mesh2dPipelineKey::HDR) {
true => ViewTarget::TEXTURE_FORMAT_HDR,
false => TextureFormat::bevy_default(),
};
RenderPipelineDescriptor {
vertex: VertexState {
// Use our custom shader
shader: COLORED_MESH2D_SHADER_HANDLE,
entry_point: "vertex".into(),
shader_defs: vec![],
// Use our custom vertex buffer
buffers: vec![vertex_layout],
},
fragment: Some(FragmentState {
// Use our custom shader
shader: COLORED_MESH2D_SHADER_HANDLE,
shader_defs: vec![],
entry_point: "fragment".into(),
targets: vec![Some(ColorTargetState {
format,
blend: Some(BlendState::ALPHA_BLENDING),
write_mask: ColorWrites::ALL,
})],
}),
// Use the two standard uniforms for 2d meshes
layout: vec![
// Bind group 0 is the view uniform
self.mesh2d_pipeline.view_layout.clone(),
// Bind group 1 is the mesh uniform
self.mesh2d_pipeline.mesh_layout.clone(),
],
push_constant_ranges: vec![],
primitive: PrimitiveState {
front_face: FrontFace::Ccw,
cull_mode: Some(Face::Back),
unclipped_depth: false,
polygon_mode: PolygonMode::Fill,
conservative: false,
topology: key.primitive_topology(),
strip_index_format: None,
},
depth_stencil: None,
multisample: MultisampleState {
count: key.msaa_samples(),
mask: !0,
alpha_to_coverage_enabled: false,
},
label: Some("colored_mesh2d_pipeline".into()),
}
}
Trait Implementations§
§impl Binary for Mesh2dPipelineKey
impl Binary for Mesh2dPipelineKey
§impl BitAnd for Mesh2dPipelineKey
impl BitAnd for Mesh2dPipelineKey
§fn bitand(self, other: Mesh2dPipelineKey) -> Mesh2dPipelineKey
fn bitand(self, other: Mesh2dPipelineKey) -> Mesh2dPipelineKey
The bitwise and (&
) of the bits in two flags values.
§type Output = Mesh2dPipelineKey
type Output = Mesh2dPipelineKey
&
operator.§impl BitAndAssign for Mesh2dPipelineKey
impl BitAndAssign for Mesh2dPipelineKey
§fn bitand_assign(&mut self, other: Mesh2dPipelineKey)
fn bitand_assign(&mut self, other: Mesh2dPipelineKey)
The bitwise and (&
) of the bits in two flags values.
§impl BitOr for Mesh2dPipelineKey
impl BitOr for Mesh2dPipelineKey
§fn bitor(self, other: Mesh2dPipelineKey) -> Mesh2dPipelineKey
fn bitor(self, other: Mesh2dPipelineKey) -> Mesh2dPipelineKey
The bitwise or (|
) of the bits in two flags values.
§type Output = Mesh2dPipelineKey
type Output = Mesh2dPipelineKey
|
operator.§impl BitOrAssign for Mesh2dPipelineKey
impl BitOrAssign for Mesh2dPipelineKey
§fn bitor_assign(&mut self, other: Mesh2dPipelineKey)
fn bitor_assign(&mut self, other: Mesh2dPipelineKey)
The bitwise or (|
) of the bits in two flags values.
§impl BitXor for Mesh2dPipelineKey
impl BitXor for Mesh2dPipelineKey
§fn bitxor(self, other: Mesh2dPipelineKey) -> Mesh2dPipelineKey
fn bitxor(self, other: Mesh2dPipelineKey) -> Mesh2dPipelineKey
The bitwise exclusive-or (^
) of the bits in two flags values.
§type Output = Mesh2dPipelineKey
type Output = Mesh2dPipelineKey
^
operator.§impl BitXorAssign for Mesh2dPipelineKey
impl BitXorAssign for Mesh2dPipelineKey
§fn bitxor_assign(&mut self, other: Mesh2dPipelineKey)
fn bitxor_assign(&mut self, other: Mesh2dPipelineKey)
The bitwise exclusive-or (^
) of the bits in two flags values.
§impl Clone for Mesh2dPipelineKey
impl Clone for Mesh2dPipelineKey
§fn clone(&self) -> Mesh2dPipelineKey
fn clone(&self) -> Mesh2dPipelineKey
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for Mesh2dPipelineKey
impl Debug for Mesh2dPipelineKey
§impl Extend<Mesh2dPipelineKey> for Mesh2dPipelineKey
impl Extend<Mesh2dPipelineKey> for Mesh2dPipelineKey
§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = Mesh2dPipelineKey>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = Mesh2dPipelineKey>,
The bitwise or (|
) of the bits in each flags value.
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)§impl Flags for Mesh2dPipelineKey
impl Flags for Mesh2dPipelineKey
§const FLAGS: &'static [Flag<Mesh2dPipelineKey>] = _
const FLAGS: &'static [Flag<Mesh2dPipelineKey>] = _
§fn from_bits_retain(bits: u32) -> Mesh2dPipelineKey
fn from_bits_retain(bits: u32) -> Mesh2dPipelineKey
§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|
) of the bits in two flags values.§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!
). Read more§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^
) of the bits in two flags values.§fn set(&mut self, other: Self, value: bool)where
Self: Sized,
fn set(&mut self, other: Self, value: bool)where
Self: Sized,
Flags::insert
] when value
is true
or [Flags::remove
] when value
is false
.§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&
) of the bits in two flags values.§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!
). Read more§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^
) of the bits in two flags values.§fn complement(self) -> Self
fn complement(self) -> Self
!
) of the bits in a flags value, truncating the result.§impl FromIterator<Mesh2dPipelineKey> for Mesh2dPipelineKey
impl FromIterator<Mesh2dPipelineKey> for Mesh2dPipelineKey
§fn from_iter<T>(iterator: T) -> Mesh2dPipelineKeywhere
T: IntoIterator<Item = Mesh2dPipelineKey>,
fn from_iter<T>(iterator: T) -> Mesh2dPipelineKeywhere
T: IntoIterator<Item = Mesh2dPipelineKey>,
The bitwise or (|
) of the bits in each flags value.
§impl Hash for Mesh2dPipelineKey
impl Hash for Mesh2dPipelineKey
§impl IntoIterator for Mesh2dPipelineKey
impl IntoIterator for Mesh2dPipelineKey
§type Item = Mesh2dPipelineKey
type Item = Mesh2dPipelineKey
§type IntoIter = Iter<Mesh2dPipelineKey>
type IntoIter = Iter<Mesh2dPipelineKey>
§fn into_iter(self) -> <Mesh2dPipelineKey as IntoIterator>::IntoIter
fn into_iter(self) -> <Mesh2dPipelineKey as IntoIterator>::IntoIter
§impl LowerHex for Mesh2dPipelineKey
impl LowerHex for Mesh2dPipelineKey
§impl Not for Mesh2dPipelineKey
impl Not for Mesh2dPipelineKey
§fn not(self) -> Mesh2dPipelineKey
fn not(self) -> Mesh2dPipelineKey
The bitwise negation (!
) of the bits in a flags value, truncating the result.
§type Output = Mesh2dPipelineKey
type Output = Mesh2dPipelineKey
!
operator.§impl Octal for Mesh2dPipelineKey
impl Octal for Mesh2dPipelineKey
§impl PartialEq for Mesh2dPipelineKey
impl PartialEq for Mesh2dPipelineKey
§fn eq(&self, other: &Mesh2dPipelineKey) -> bool
fn eq(&self, other: &Mesh2dPipelineKey) -> bool
self
and other
values to be equal, and is used
by ==
.§impl Sub for Mesh2dPipelineKey
impl Sub for Mesh2dPipelineKey
§fn sub(self, other: Mesh2dPipelineKey) -> Mesh2dPipelineKey
fn sub(self, other: Mesh2dPipelineKey) -> Mesh2dPipelineKey
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
§type Output = Mesh2dPipelineKey
type Output = Mesh2dPipelineKey
-
operator.§impl SubAssign for Mesh2dPipelineKey
impl SubAssign for Mesh2dPipelineKey
§fn sub_assign(&mut self, other: Mesh2dPipelineKey)
fn sub_assign(&mut self, other: Mesh2dPipelineKey)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
§impl UpperHex for Mesh2dPipelineKey
impl UpperHex for Mesh2dPipelineKey
impl Copy for Mesh2dPipelineKey
impl Eq for Mesh2dPipelineKey
impl StructuralPartialEq for Mesh2dPipelineKey
Auto Trait Implementations§
impl Freeze for Mesh2dPipelineKey
impl RefUnwindSafe for Mesh2dPipelineKey
impl Send for Mesh2dPipelineKey
impl Sync for Mesh2dPipelineKey
impl Unpin for Mesh2dPipelineKey
impl UnwindSafe for Mesh2dPipelineKey
Blanket Implementations§
§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
§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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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
.§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
.§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.§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.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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 more