pub struct Renderer {Show 17 fields
triangle: TrianglePipeline,
quad: QuadPipeline,
sprite: SpritePipeline,
graphics: GraphicsPipeline,
text: TextPipeline,
flex_text: FlexTextPipeline,
mesh: MeshPipeline,
advanced_blend: AdvancedBlendPipelines,
blit: BlitPipeline,
clip: ClipPipeline,
path_clip: PathClipPipeline,
mask_texture: MaskTexturePipeline,
path_mask_texture: PathMaskTexturePipeline,
mask_compose: MaskComposePipeline,
mask_combine: MaskCombinePipeline,
mask_cache: RefCell<MaskCache>,
output_format: TextureFormat,
}Expand description
2D renderer.
Owns the GPU pipelines used to draw scenes onto a [wgpu::TextureView].
Construct one per output format (surface or RenderTexture).
Fields§
§triangle: TrianglePipeline§quad: QuadPipeline§sprite: SpritePipeline§graphics: GraphicsPipeline§text: TextPipeline§flex_text: FlexTextPipeline§mesh: MeshPipeline§advanced_blend: AdvancedBlendPipelines§blit: BlitPipeline§clip: ClipPipeline§path_clip: PathClipPipeline§mask_texture: MaskTexturePipeline§path_mask_texture: PathMaskTexturePipeline§mask_compose: MaskComposePipeline§mask_combine: MaskCombinePipeline§mask_cache: RefCell<MaskCache>§output_format: TextureFormatImplementations§
Source§impl Renderer
impl Renderer
Sourcepub fn new(
app: &Application,
output_format: TextureFormat,
) -> Result<Self, Error>
pub fn new( app: &Application, output_format: TextureFormat, ) -> Result<Self, Error>
Construct a renderer that targets the given color format.
§Errors
Currently infallible; reserved for future pipeline-creation failures.
Sourcepub fn apply_advanced_blend(
&self,
app: &Application,
mode: BlendMode,
backdrop: &RenderTexture,
foreground: &RenderTexture,
output: &RenderTexture,
)
pub fn apply_advanced_blend( &self, app: &Application, mode: BlendMode, backdrop: &RenderTexture, foreground: &RenderTexture, output: &RenderTexture, )
Compose two render-textures via an advanced (Tier C) blend mode.
backdrop is the previously-rendered destination, foreground
is this node’s contribution rendered into its own RT, and the
composite lands in output. All three must share dimensions
and the format the renderer was constructed against.
§Panics
Panics if mode is a standard (GPU-native) blend mode — those
don’t have a per-mode pipeline registered. Use the standard
pipelines (via render_stage + Container::blend_mode) for
those.
Sourcepub fn render(&self, app: &Application, view: &TextureView, clear: Color)
pub fn render(&self, app: &Application, view: &TextureView, clear: Color)
Clear the target with clear, then draw the M0.5 hardcoded triangle.
Sourcepub fn render_quad(
&self,
app: &Application,
view: &TextureView,
clear: Color,
texture: &Texture,
model: Mat4,
tint: Color,
)
pub fn render_quad( &self, app: &Application, view: &TextureView, clear: Color, texture: &Texture, model: Mat4, tint: Color, )
Clear the target with clear, then draw a single textured quad.
Sourcepub fn render_stage(
&self,
app: &Application,
view: &TextureView,
clear: Color,
stage: &Stage,
) -> RenderStats
pub fn render_stage( &self, app: &Application, view: &TextureView, clear: Color, stage: &Stage, ) -> RenderStats
Clear the target, traverse stage, draw every visible node.
Two paths internally:
- Fast path (no advanced blend modes AND no clipped
containers): one render pass directly into
view, batching by pipeline + blend mode. - Slow path (any node uses an advanced blend mode OR has a
clip mask set): allocate internal
RenderTextures atapp.width()/app.height(), render the scene minus the affected subtrees, then for each affected node render its subtree into a foreground RT, optionallyapply_clipit, and composite onto the in-progress destination (advanced blend modes useapply_advanced_blend; clipped containers use source-over via the blit pipeline). Final blit toview.
Slow-path RT dimensions track Application::width() /
Application::height();
for views whose dims diverge from the app config, use a matching
AppConfig or pre-render into a fixed-size RenderTexture.
Returns RenderStats with the resulting draw-call and sprite counts.
Sourcepub fn apply_clip(
&self,
app: &Application,
shape: MaskShape,
foreground: &RenderTexture,
output: &RenderTexture,
)
pub fn apply_clip( &self, app: &Application, shape: MaskShape, foreground: &RenderTexture, output: &RenderTexture, )
Apply a MaskShape clip to foreground, writing the masked
result to output. Pixels outside the mask have their alpha
zeroed.
Auto-dispatched by render_stage when a container’s
Container::clip is set; this method
is also exposed for callers who pre-render a foreground RT
manually and want to mask it without going through the full
scene-graph path.
Sourcepub fn apply_clip_vector(
&self,
app: &Application,
vector: &Vector,
foreground: &RenderTexture,
output: &RenderTexture,
)
pub fn apply_clip_vector( &self, app: &Application, vector: &Vector, foreground: &RenderTexture, output: &RenderTexture, )
Vector-driven variant of Self::apply_clip (M-VEC.6 /
AUT-58). Generates the mask via the M-DYN.1 path (cached) and
composes against the foreground via Self::apply_mask_to_texture.
Accepts paths.
Sourcepub fn apply_privacy_blur(
&self,
app: &Application,
shape: MaskShape,
radius: f32,
base: &RenderTexture,
output: &RenderTexture,
)
pub fn apply_privacy_blur( &self, app: &Application, shape: MaskShape, radius: f32, base: &RenderTexture, output: &RenderTexture, )
Composition primitive — render base, blurred only inside
shape, into output. Outside the shape the pixels are
preserved as-is.
Started life as the AUT-20 rectangle privacy blur; AUT-21
generalized it to any MaskShape (rounded rect today;
ellipse / circle / freehand path follow in AUT-30/-34/-35).
Calling with MaskShape::Rect reproduces the AUT-20 behavior;
MaskShape::RoundedRect redacts with cinematic rounded corners
matching modern app surfaces.
Pipeline (all RTs match base’s dimensions at the renderer’s
output format):
base ─ BlurFilter(radius) ─► blur_rt
│
├─ ClipPipeline(shape) ─► masked_rt
│
base ─────────────────────────► output (Blit::REPLACE)
│
masked_rt ────────────────────► output (Blit::ALPHA_BLENDING — over)shape is in NDC [-1, +1]² (screen space). radius is the
Gaussian blur radius in pixels; AUT-22 will expose this as a
scene-data parameter rather than just a method argument.
Use this when you’ve pre-rendered a frame into base (e.g.
the recording surface) and want to redact a known region.
Future enhancement: a Container
node type that triggers this automatically during scene
traversal.
Sourcepub fn apply_privacy_blur_vector(
&self,
app: &Application,
vector: &Vector,
radius: f32,
base: &RenderTexture,
output: &RenderTexture,
)
pub fn apply_privacy_blur_vector( &self, app: &Application, vector: &Vector, radius: f32, base: &RenderTexture, output: &RenderTexture, )
Vector-driven variant of Self::apply_privacy_blur (M-VEC.4
/ AUT-56). Same composition shape but the mask is produced
from a Vector instead of a
MaskShape, unlocking path support and the M-DYN.2 cache
for repeated regions across frames.
Pipeline:
base ─ BlurFilter(radius) ──────────► blur_rt
│
vector ─ generate_vector_mask_texture ─► mask_rt
│
(blur_rt × mask_rt) ► masked_rt
│
base ───────────────────────────────────► output (REPLACE)
masked_rt ──────────────────────────────► output (compose_over)Sourcepub fn apply_solid_redaction(
&self,
app: &Application,
shape: MaskShape,
color: Color,
base: &RenderTexture,
output: &RenderTexture,
)
pub fn apply_solid_redaction( &self, app: &Application, shape: MaskShape, color: Color, base: &RenderTexture, output: &RenderTexture, )
Composition primitive — render base, with shape filled by
a flat color (M-MASK / AUT-23 solid redaction). Outside the
shape the pixels are preserved as-is.
The companion to Self::apply_privacy_blur. Privacy blur is
polish (the redacted region still has texture); solid
redaction is trust (the region is replaced with an opaque
fill). Use this for content where partial reconstruction must
be impossible — API keys, passwords, secrets.
Pipeline:
fill_rt ← cleared to `color` (RP LoadOp::Clear)
│
├─ ClipPipeline(shape) ─► masked_rt
│
base ─────────────────────────► output (Blit::REPLACE)
│
masked_rt ────────────────────► output (Blit::ALPHA_BLENDING — over)Tip: use a fully-opaque color (alpha 1.0) for true redaction;
a partial alpha will let base show through proportionally,
which defeats the “trust” use case.
Sourcepub fn apply_solid_redaction_vector(
&self,
app: &Application,
vector: &Vector,
color: Color,
base: &RenderTexture,
output: &RenderTexture,
)
pub fn apply_solid_redaction_vector( &self, app: &Application, vector: &Vector, color: Color, base: &RenderTexture, output: &RenderTexture, )
Vector-driven variant of Self::apply_solid_redaction
(M-VEC.5 / AUT-57). Same composition shape, but the mask is
produced from a Vector — including
freehand polygons via VectorShape::Path.
Sourcepub fn combine_masks(
&self,
app: &Application,
a: &RenderTexture,
b: &RenderTexture,
op: MaskCombineOp,
output: &RenderTexture,
)
pub fn combine_masks( &self, app: &Application, a: &RenderTexture, b: &RenderTexture, op: MaskCombineOp, output: &RenderTexture, )
Combine two alpha-mask textures via a boolean operation
(M-VEC.11 / AUT-63). The resulting mask is itself a regular
alpha-mask RenderTexture and can drive any downstream
composition primitive (apply_mask_to_texture,
compose_blur_through_mask, etc.).
Sourcepub fn compose_blur_through_mask(
&self,
app: &Application,
base: &RenderTexture,
radius: f32,
mask: &RenderTexture,
output: &RenderTexture,
)
pub fn compose_blur_through_mask( &self, app: &Application, base: &RenderTexture, radius: f32, mask: &RenderTexture, output: &RenderTexture, )
Compose privacy blur through an explicit alpha-mask texture
(M-DYN.3 / AUT-45). Lower-level than Self::apply_privacy_blur:
the caller supplies the mask texture, which lets multiple
effects share one mask without regenerating it. Same composition
shape as the high-level method:
base ─ BlurFilter(radius) ──► blur_rt
│
blur_rt × mask ── masked_rt ← apply_mask_to_texture
│
base ─────────────────────────► output (REPLACE)
masked_rt ─────────────────────► output (compose_over)Use case: when a region is being privacy-blurred and
solid-redacted and spotlighted on the same frame, generate
the mask once via
Self::cached_vector_mask_texture
and pass the result to all three composition primitives.
Sourcepub fn compose_solid_through_mask(
&self,
app: &Application,
base: &RenderTexture,
color: Color,
mask: &RenderTexture,
output: &RenderTexture,
)
pub fn compose_solid_through_mask( &self, app: &Application, base: &RenderTexture, color: Color, mask: &RenderTexture, output: &RenderTexture, )
Compose solid-color redaction through an explicit alpha-mask
texture (M-DYN.4 / AUT-46). Sister of
Self::compose_blur_through_mask — same shape, but the
“what’s inside” is a solid color instead of a blur.
Sourcepub fn compose_dim_through_inverted_mask(
&self,
app: &Application,
base: &RenderTexture,
dim_color: Color,
inverted_mask: &RenderTexture,
output: &RenderTexture,
)
pub fn compose_dim_through_inverted_mask( &self, app: &Application, base: &RenderTexture, dim_color: Color, inverted_mask: &RenderTexture, output: &RenderTexture, )
Compose dim-outside (spotlight) through an explicit inverted
alpha-mask texture (M-DYN.5 / AUT-47). The mask should already
be inverted (e.g., from
Self::cached_mask_texture_inverted); this primitive just
composes a constant dim_color through it.
Sourcepub fn apply_mask_to_texture(
&self,
app: &Application,
foreground: &RenderTexture,
mask: &RenderTexture,
output: &RenderTexture,
)
pub fn apply_mask_to_texture( &self, app: &Application, foreground: &RenderTexture, mask: &RenderTexture, output: &RenderTexture, )
Compose foreground × mask.alpha into output (M-VEC.4..6 /
AUT-56..58 building block). The mask texture must store
coverage in alpha (the format produced by
Self::generate_mask_texture et al).
All three RTs must share dimensions and format. This is the primitive that the vector-driven privacy blur / redaction / spotlight refactor uses internally; expose it as part of the public surface so app-level code (when it lands) can drive composition through the same path.
Sourcepub fn generate_mask_texture(
&self,
app: &Application,
shape: MaskShape,
w: u32,
h: u32,
) -> RenderTexture
pub fn generate_mask_texture( &self, app: &Application, shape: MaskShape, w: u32, h: u32, ) -> RenderTexture
Generate an alpha-mask RenderTexture for shape at
(w, h) (M-DYN.1 / AUT-43). The texture stores coverage as
(m, m, m, m) so consumers can either alpha-multiply (sample
.a) or display as a grayscale silhouette.
This primitive owns only coverage. Privacy blur, redaction,
and spotlight composition layers (M-DYN.3+, M-VEC.4+) consume
these textures separately. The cache (AUT-44) layers on top
to avoid regenerating identical masks every frame.
Sourcepub fn generate_vector_mask_texture(
&self,
app: &Application,
vector: &Vector,
w: u32,
h: u32,
) -> RenderTexture
pub fn generate_vector_mask_texture( &self, app: &Application, vector: &Vector, w: u32, h: u32, ) -> RenderTexture
Generate an alpha-mask RenderTexture for a
Vector primitive (M-VEC.3 / AUT-55).
Routes to the analytic-SDF or path-mask path depending on the
underlying VectorShape.
Only Vector::shape is
consulted — fill / stroke /
opacity / transform don’t affect mask coverage.
transform does shift the SDF center / path points if
honored; for V1 we ignore it (the mask is always evaluated in
NDC against the raw shape data).
This is the bridge used by M-VEC.4..6: any caller that wants
to drive a mask from vector data uses this entry point, and
the underlying primitive (privacy blur, redaction, spotlight)
gets the same alpha texture regardless of which VectorShape
variant produced it.
Sourcepub fn cached_vector_mask_texture(
&self,
app: &Application,
vector: &Vector,
w: u32,
h: u32,
) -> Arc<RenderTexture>
pub fn cached_vector_mask_texture( &self, app: &Application, vector: &Vector, w: u32, h: u32, ) -> Arc<RenderTexture>
Cached variant of Self::generate_vector_mask_texture.
Analytic shapes go through the M-DYN.2 cache; path shapes
bypass (V1: paths not cached — see M-DYN.2’s chapter).
Sourcepub fn cached_mask_texture(
&self,
app: &Application,
shape: MaskShape,
w: u32,
h: u32,
) -> Arc<RenderTexture>
pub fn cached_mask_texture( &self, app: &Application, shape: MaskShape, w: u32, h: u32, ) -> Arc<RenderTexture>
Cached variant of Self::generate_mask_texture (M-DYN.2 /
AUT-44). Returns an Arc<RenderTexture> that may be shared
across the cache and other call sites; identical (shape, w,
h) inputs reuse the same GPU texture across frames instead of
regenerating.
Cache eviction is FIFO at 64 entries (see the MAX_ENTRIES
constant in crate::render::mask_cache). f32 fields hash by exact bits,
so callers re-passing the same shape value Just Work.
Sourcepub fn cached_mask_texture_inverted(
&self,
app: &Application,
shape: MaskShape,
w: u32,
h: u32,
) -> Arc<RenderTexture>
pub fn cached_mask_texture_inverted( &self, app: &Application, shape: MaskShape, w: u32, h: u32, ) -> Arc<RenderTexture>
Cached + inverted variant.
Sourcepub fn mask_cache_stats(&self) -> (u64, u64)
pub fn mask_cache_stats(&self) -> (u64, u64)
Returns (hits, misses) for the mask texture cache. Useful
for tests and observability.
Sourcepub fn clear_mask_cache(&self)
pub fn clear_mask_cache(&self)
Drop every entry in the mask texture cache. Call when the renderer’s underlying resources change (e.g., format swap) or in tests that want to start from a clean slate.
Sourcepub fn generate_mask_texture_inverted(
&self,
app: &Application,
shape: MaskShape,
w: u32,
h: u32,
) -> RenderTexture
pub fn generate_mask_texture_inverted( &self, app: &Application, shape: MaskShape, w: u32, h: u32, ) -> RenderTexture
Inverse variant of Self::generate_mask_texture: pixels
outside the shape are opaque, inside are transparent. Used by
spotlight / dim-outside composition (M-DYN.5).
Sourcepub fn generate_path_mask_texture(
&self,
app: &Application,
points: &[Vec2],
w: u32,
h: u32,
) -> RenderTexture
pub fn generate_path_mask_texture( &self, app: &Application, points: &[Vec2], w: u32, h: u32, ) -> RenderTexture
Generate an alpha-mask RenderTexture for a freehand polygon
(M-DYN.1 / AUT-43, path variant). Up to 32 vertices honored
(uniform-buffer cap; same as apply_path_clip).
Sourcepub fn apply_path_clip(
&self,
app: &Application,
points: &[Vec2],
foreground: &RenderTexture,
output: &RenderTexture,
)
pub fn apply_path_clip( &self, app: &Application, points: &[Vec2], foreground: &RenderTexture, output: &RenderTexture, )
Apply a freehand polygon mask to foreground, writing the
masked result to output (M-MASK / AUT-35).
points is a closed polygon in NDC [-1, +1]². Up to
MAX_PATH_POINTS (32) vertices are honored; the rest are
silently ignored. Pixels inside the polygon pass through
foreground unchanged; pixels outside drop to alpha 0.
Implementation note: the WGSL fragment shader runs a crossings-test point-in-polygon at every pixel — no tessellation, no SDF. AA is hard-edge for V1; the rasterized output is integer-pixel accurate (Jordan curve theorem).
Sourcepub fn apply_solid_redaction_path(
&self,
app: &Application,
points: &[Vec2],
color: Color,
base: &RenderTexture,
output: &RenderTexture,
)
pub fn apply_solid_redaction_path( &self, app: &Application, points: &[Vec2], color: Color, base: &RenderTexture, output: &RenderTexture, )
Composition primitive — render base, with points (a closed
polygon in NDC) filled by color (M-MASK / AUT-35 freehand
solid redaction). Outside the polygon: base preserved.
Sister to Self::apply_solid_redaction but with a freehand
polygon instead of a MaskShape. Same four-stage composition
(clear fill / mask / blit base / compose over) — the only
difference is the masking pass uses Self::apply_path_clip
instead of the SDF clip.
Sourcepub fn apply_spotlight(
&self,
app: &Application,
shape: MaskShape,
dim_color: Color,
base: &RenderTexture,
output: &RenderTexture,
)
pub fn apply_spotlight( &self, app: &Application, shape: MaskShape, dim_color: Color, base: &RenderTexture, output: &RenderTexture, )
Composition primitive — render base, dimmed everywhere
outside shape (M-MASK / AUT-28 spotlight, AUT-29 dim
outside). Inside the shape, pixels are preserved as-is.
dim_color is the overlay shade applied outside the shape;
its alpha controls the dim strength (0 = no effect, 1 = fully
replaces the surrounding content). For “spotlight a button”
effects dim_color = Color::rgba(0.0, 0.0, 0.0, 0.65) is a
good cinematic default.
Pipeline (mirrors solid redaction with an inverted clip):
fill_rt ← cleared to `dim_color`
│
├─ ClipPipeline(shape, invert=true) ─► masked_rt
│
base ─────────────────────────► output (Blit::REPLACE)
│
masked_rt ────────────────────► output (Blit::ALPHA_BLENDING — over)Sourcepub fn apply_spotlight_vector(
&self,
app: &Application,
vector: &Vector,
dim_color: Color,
base: &RenderTexture,
output: &RenderTexture,
)
pub fn apply_spotlight_vector( &self, app: &Application, vector: &Vector, dim_color: Color, base: &RenderTexture, output: &RenderTexture, )
Vector-driven variant of Self::apply_spotlight (M-VEC.6 /
AUT-58). Inverse-mask path: pixels OUTSIDE the shape are
dimmed by dim_color. Accepts paths.
Sourcepub fn apply_dim_outside_data(
&self,
app: &Application,
dim: &DimOutside,
base: &RenderTexture,
output: &RenderTexture,
)
pub fn apply_dim_outside_data( &self, app: &Application, dim: &DimOutside, base: &RenderTexture, output: &RenderTexture, )
Convenience wrapper over Self::apply_spotlight that
consumes a DimOutside data value
(M-MASK / AUT-29).
Editor inspector controls and persisted documents work with
DimOutside directly; this method exists so the app side
never needs to convert a DimStrength enum back to an alpha
itself.
Sourcepub fn apply_dim_outside_vector(
&self,
app: &Application,
vector: &Vector,
strength: DimStrength,
base: &RenderTexture,
output: &RenderTexture,
)
pub fn apply_dim_outside_vector( &self, app: &Application, vector: &Vector, strength: DimStrength, base: &RenderTexture, output: &RenderTexture, )
Vector-driven variant of Self::apply_dim_outside_data
(M-VEC.7 / AUT-59). Same composition as apply_spotlight_vector
but the dim color is derived from a
DimStrength preset
(Light / Medium / Heavy / Custom(alpha)). Accepts paths.
Sourcepub fn apply_privacy_blur_data(
&self,
app: &Application,
blur: &PrivacyBlur,
base: &RenderTexture,
output: &RenderTexture,
)
pub fn apply_privacy_blur_data( &self, app: &Application, blur: &PrivacyBlur, base: &RenderTexture, output: &RenderTexture, )
Convenience wrapper over Self::apply_privacy_blur that
consumes a PrivacyBlur data
value (M-MASK / AUT-22).
Editor inspector controls and persisted documents work with
PrivacyBlur structs directly; this method exists so the app
side never needs to convert a BlurStrength enum back to a raw
f32 itself.
Sourcefn render_stage_fast(
&self,
app: &Application,
view: &TextureView,
clear: Color,
stage: &Stage,
) -> RenderStats
fn render_stage_fast( &self, app: &Application, view: &TextureView, clear: Color, stage: &Stage, ) -> RenderStats
Fast path: one render pass, no offscreen indirection.
Sourcefn render_stage_with_advanced_dispatch(
&self,
app: &Application,
view: &TextureView,
clear: Color,
stage: &Stage,
dispatched: &[NodeId],
) -> RenderStats
fn render_stage_with_advanced_dispatch( &self, app: &Application, view: &TextureView, clear: Color, stage: &Stage, dispatched: &[NodeId], ) -> RenderStats
Slow path with auto-dispatch — see render_stage.
Sourcefn draw_subtree_to_rt(
&self,
app: &Application,
dest: &RenderTexture,
clear: Color,
stage: &Stage,
start: NodeId,
exclude: &HashSet<NodeId>,
) -> RenderStats
fn draw_subtree_to_rt( &self, app: &Application, dest: &RenderTexture, clear: Color, stage: &Stage, start: NodeId, exclude: &HashSet<NodeId>, ) -> RenderStats
Draw a subtree of stage (rooted at start, skipping exclude)
into dest. Used by both phases of the advanced-dispatch path.
Sourcepub fn apply_filter(
&self,
app: &Application,
filter: &dyn Filter,
input: &RenderTexture,
output: &RenderTexture,
)
pub fn apply_filter( &self, app: &Application, filter: &dyn Filter, input: &RenderTexture, output: &RenderTexture, )
Apply filter to input, writing the final result to output.
Multi-pass filters allocate a scratch RenderTexture (same size +
format as output) and ping-pong between it and output.
fn with_clearing_pass( app: &Application, view: &TextureView, clear: Color, draw: impl FnOnce(&mut RenderPass<'_>), )
Auto Trait Implementations§
impl !Freeze for Renderer
impl !RefUnwindSafe for Renderer
impl Send for Renderer
impl !Sync for Renderer
impl Unpin for Renderer
impl UnsafeUnpin for Renderer
impl !UnwindSafe for Renderer
Blanket Implementations§
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> 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