pub struct WebGpuBackend { /* private fields */ }Implementations§
Source§impl WebGpuBackend
impl WebGpuBackend
Sourcepub fn new(device_ordinal: usize) -> Result<Self>
pub fn new(device_ordinal: usize) -> Result<Self>
Initialize a WebGPU backend for a discrete GPU ordinal.
§Examples
use tenferro_gpu::webgpu::WebGpuBackend;
let _ctor: fn(usize) -> tenferro_tensor::Result<WebGpuBackend> = WebGpuBackend::new;§Errors
Returns crate::Error::RuntimeState when no adapter/device is
available, or crate::Error::BackendSource when CubeCL initialization
fails.
Sourcepub fn new_default() -> Result<Self>
pub fn new_default() -> Result<Self>
Initialize a WebGPU backend using CubeCL’s default adapter selection.
§Examples
use tenferro_gpu::webgpu::WebGpuBackend;
let _ctor: fn() -> tenferro_tensor::Result<WebGpuBackend> = WebGpuBackend::new_default;§Errors
Returns crate::Error::RuntimeState when default adapter selection
is unavailable, or crate::Error::BackendSource when initialization
fails.
Sourcepub fn from_runtime(runtime: WebGpuRuntime) -> Self
pub fn from_runtime(runtime: WebGpuRuntime) -> Self
Build a WebGPU backend from an initialized runtime.
§Examples
use tenferro_gpu::{webgpu::WebGpuBackend, webgpu::WebGpuRuntime};
let _from_runtime: fn(WebGpuRuntime) -> WebGpuBackend = WebGpuBackend::from_runtime;Sourcepub fn runtime(&self) -> &WebGpuRuntime
pub fn runtime(&self) -> &WebGpuRuntime
Return this backend’s WebGPU runtime.
§Examples
use tenferro_gpu::{webgpu::WebGpuBackend, webgpu::WebGpuRuntime};
let _runtime: fn(&WebGpuBackend) -> &WebGpuRuntime = WebGpuBackend::runtime;Sourcepub fn runtime_identity(&self) -> WebGpuRuntimeIdentity
pub fn runtime_identity(&self) -> WebGpuRuntimeIdentity
Return the opaque identity of this exact executable backend instance.
Clones of a backend return the same identity. Independently initialized backends return different identities even when they target the same WebGPU device ordinal. This also covers Apple-backed WebGPU runtimes.
§Examples
use tenferro_gpu::webgpu::WebGpuBackend;
let _identity = WebGpuBackend::runtime_identity;Sourcepub fn synchronize(&self) -> Result<()>
pub fn synchronize(&self) -> Result<()>
Block until queued WebGPU work completes.
§Examples
use tenferro_gpu::webgpu::WebGpuBackend;
let _sync: fn(&WebGpuBackend) -> tenferro_tensor::Result<()> = WebGpuBackend::synchronize;§Errors
Returns crate::Error::BackendSource when queue flush or
synchronization fails, or crate::Error::RuntimeState when the
runtime has lost its device state.
Trait Implementations§
Source§impl BackendCachedDot for WebGpuBackend
impl BackendCachedDot for WebGpuBackend
Source§fn dot_general_read_into_accum_cached(
&mut self,
_cache: &mut Self::RuntimeCache,
_cache_slot: Option<usize>,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
config: &DotGeneralConfig,
accumulation: DotGeneralAccumulation,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn dot_general_read_into_accum_cached( &mut self, _cache: &mut Self::RuntimeCache, _cache_slot: Option<usize>, lhs: TensorRead<'_>, rhs: TensorRead<'_>, config: &DotGeneralConfig, accumulation: DotGeneralAccumulation, out: TensorWrite<'_>, ) -> Result<(), Error>
impl BackendRuntimeCache for WebGpuBackend
Source§impl BackendSession for WebGpuBackend
impl BackendSession for WebGpuBackend
Source§fn vdot_read(
&mut self,
_lhs: TensorRead<'_>,
_rhs: TensorRead<'_>,
) -> Result<Tensor, Error>
fn vdot_read( &mut self, _lhs: TensorRead<'_>, _rhs: TensorRead<'_>, ) -> Result<Tensor, Error>
Source§fn norm_squared_read(&mut self, _input: TensorRead<'_>) -> Result<Tensor, Error>
fn norm_squared_read(&mut self, _input: TensorRead<'_>) -> Result<Tensor, Error>
Source§fn axpby_read_into_accum(
&mut self,
_alpha: ContractionScalar,
_x: TensorRead<'_>,
_beta: ContractionScalar,
_y: TensorWrite<'_>,
) -> Result<(), Error>
fn axpby_read_into_accum( &mut self, _alpha: ContractionScalar, _x: TensorRead<'_>, _beta: ContractionScalar, _y: TensorWrite<'_>, ) -> Result<(), Error>
y <- alpha * x + beta * y in one pass into caller-owned storage. Read moreSource§impl BackendSessionHost for WebGpuBackend
impl BackendSessionHost for WebGpuBackend
fn with_backend_session<R: Send>( &mut self, f: impl FnOnce(&mut dyn BackendSession) -> R + Send, ) -> R
Source§impl Clone for WebGpuBackend
impl Clone for WebGpuBackend
Source§fn clone(&self) -> WebGpuBackend
fn clone(&self) -> WebGpuBackend
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WebGpuBackend
impl Debug for WebGpuBackend
Source§impl DotGeneralPreparation for WebGpuBackend
impl DotGeneralPreparation for WebGpuBackend
Source§fn prepare(
&self,
request: DotGeneralPrepareRequest<'_>,
) -> Result<PrepareCapability, PrepareError>
fn prepare( &self, request: DotGeneralPrepareRequest<'_>, ) -> Result<PrepareCapability, PrepareError>
Source§impl TensorAnalytic for WebGpuBackend
impl TensorAnalytic for WebGpuBackend
Source§fn rsqrt_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>
fn rsqrt_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>
Source§fn pow_read(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
) -> Result<Tensor, Error>
fn pow_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>
Source§fn expm1_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>
fn expm1_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>
Source§fn log1p_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>
fn log1p_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>
impl TensorBackend for WebGpuBackend
Source§impl TensorBuffer for WebGpuBackend
impl TensorBuffer for WebGpuBackend
fn reclaim_buffer(&mut self, _tensor: Tensor)
Source§impl TensorDeviceTransfer for WebGpuBackend
impl TensorDeviceTransfer for WebGpuBackend
Source§fn download_to_host(&mut self, tensor: TensorRead<'_>) -> Result<Tensor>
fn download_to_host(&mut self, tensor: TensorRead<'_>) -> Result<Tensor>
Source§fn upload_host_tensor(&mut self, tensor: TensorRead<'_>) -> Result<Tensor>
fn upload_host_tensor(&mut self, tensor: TensorRead<'_>) -> Result<Tensor>
Source§impl TensorDot for WebGpuBackend
impl TensorDot for WebGpuBackend
Source§fn dot_general(
&mut self,
lhs: &Tensor,
rhs: &Tensor,
config: &DotGeneralConfig,
) -> Result<Tensor>
fn dot_general( &mut self, lhs: &Tensor, rhs: &Tensor, config: &DotGeneralConfig, ) -> Result<Tensor>
Source§fn dot_general_read_into(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
config: &DotGeneralConfig,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn dot_general_read_into( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, config: &DotGeneralConfig, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn dot_general_read_into_accum(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
config: &DotGeneralConfig,
accumulation: DotGeneralAccumulation,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn dot_general_read_into_accum( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, config: &DotGeneralConfig, accumulation: DotGeneralAccumulation, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§impl TensorElementwise for WebGpuBackend
impl TensorElementwise for WebGpuBackend
Source§fn compare(
&mut self,
_lhs: &Tensor,
_rhs: &Tensor,
_dir: &CompareDir,
) -> Result<Tensor>
fn compare( &mut self, _lhs: &Tensor, _rhs: &Tensor, _dir: &CompareDir, ) -> Result<Tensor>
Source§fn select(
&mut self,
_pred: &Tensor,
_on_true: &Tensor,
_on_false: &Tensor,
) -> Result<Tensor>
fn select( &mut self, _pred: &Tensor, _on_true: &Tensor, _on_false: &Tensor, ) -> Result<Tensor>
Source§fn clamp(
&mut self,
_input: &Tensor,
_lower: &Tensor,
_upper: &Tensor,
) -> Result<Tensor>
fn clamp( &mut self, _input: &Tensor, _lower: &Tensor, _upper: &Tensor, ) -> Result<Tensor>
Source§fn elementwise_read_into(
&mut self,
op: ElementwiseReadOp,
inputs: &[TensorRead<'_>],
out: TensorWrite<'_>,
) -> Result<(), Error>
fn elementwise_read_into( &mut self, op: ElementwiseReadOp, inputs: &[TensorRead<'_>], out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn add_read(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
) -> Result<Tensor, Error>
fn add_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>
Source§fn add_into(
&mut self,
lhs: &Tensor,
rhs: &Tensor,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn add_into( &mut self, lhs: &Tensor, rhs: &Tensor, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn add_read_into(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn add_read_into( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn sub_read(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
) -> Result<Tensor, Error>
fn sub_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>
Source§fn sub_into(
&mut self,
lhs: &Tensor,
rhs: &Tensor,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn sub_into( &mut self, lhs: &Tensor, rhs: &Tensor, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn sub_read_into(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn sub_read_into( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn mul_read(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
) -> Result<Tensor, Error>
fn mul_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>
Source§fn mul_into(
&mut self,
lhs: &Tensor,
rhs: &Tensor,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn mul_into( &mut self, lhs: &Tensor, rhs: &Tensor, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn mul_read_into(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn mul_read_into( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn neg_into(
&mut self,
input: &Tensor,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn neg_into( &mut self, input: &Tensor, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn neg_read_into(
&mut self,
input: TensorRead<'_>,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn neg_read_into( &mut self, input: TensorRead<'_>, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn conj_into(
&mut self,
input: &Tensor,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn conj_into( &mut self, input: &Tensor, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn conj_read_into(
&mut self,
input: TensorRead<'_>,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn conj_read_into( &mut self, input: TensorRead<'_>, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn div_read(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
) -> Result<Tensor, Error>
fn div_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>
Source§fn div_into(
&mut self,
lhs: &Tensor,
rhs: &Tensor,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn div_into( &mut self, lhs: &Tensor, rhs: &Tensor, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn div_read_into(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn div_read_into( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn rem(&mut self, lhs: &Tensor, _rhs: &Tensor) -> Result<Tensor, Error>
fn rem(&mut self, lhs: &Tensor, _rhs: &Tensor) -> Result<Tensor, Error>
Source§fn rem_read(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
) -> Result<Tensor, Error>
fn rem_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>
Source§fn maximum_read(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
) -> Result<Tensor, Error>
fn maximum_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>
Source§fn minimum_read(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
) -> Result<Tensor, Error>
fn minimum_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>
Source§fn compare_read(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
dir: &CompareDir,
) -> Result<Tensor, Error>
fn compare_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, dir: &CompareDir, ) -> Result<Tensor, Error>
Source§fn select_read(
&mut self,
pred: TensorRead<'_>,
on_true: TensorRead<'_>,
on_false: TensorRead<'_>,
) -> Result<Tensor, Error>
fn select_read( &mut self, pred: TensorRead<'_>, on_true: TensorRead<'_>, on_false: TensorRead<'_>, ) -> Result<Tensor, Error>
Source§fn clamp_read(
&mut self,
input: TensorRead<'_>,
lower: TensorRead<'_>,
upper: TensorRead<'_>,
) -> Result<Tensor, Error>
fn clamp_read( &mut self, input: TensorRead<'_>, lower: TensorRead<'_>, upper: TensorRead<'_>, ) -> Result<Tensor, Error>
impl TensorFusion for WebGpuBackend
Source§impl TensorIndexing for WebGpuBackend
impl TensorIndexing for WebGpuBackend
Source§fn gather(
&mut self,
_operand: &Tensor,
_start_indices: &Tensor,
_config: &GatherConfig,
) -> Result<Tensor>
fn gather( &mut self, _operand: &Tensor, _start_indices: &Tensor, _config: &GatherConfig, ) -> Result<Tensor>
Source§fn scatter(
&mut self,
_operand: &Tensor,
_scatter_indices: &Tensor,
_updates: &Tensor,
_config: &ScatterConfig,
) -> Result<Tensor>
fn scatter( &mut self, _operand: &Tensor, _scatter_indices: &Tensor, _updates: &Tensor, _config: &ScatterConfig, ) -> Result<Tensor>
Source§fn slice(&mut self, _input: &Tensor, _config: &SliceConfig) -> Result<Tensor>
fn slice(&mut self, _input: &Tensor, _config: &SliceConfig) -> Result<Tensor>
Source§fn dynamic_slice(
&mut self,
_input: &Tensor,
_starts: &Tensor,
_slice_sizes: &[usize],
) -> Result<Tensor>
fn dynamic_slice( &mut self, _input: &Tensor, _starts: &Tensor, _slice_sizes: &[usize], ) -> Result<Tensor>
Source§fn dynamic_update_slice(
&mut self,
_operand: &Tensor,
_update: &Tensor,
_starts: &Tensor,
) -> Result<Tensor>
fn dynamic_update_slice( &mut self, _operand: &Tensor, _update: &Tensor, _starts: &Tensor, ) -> Result<Tensor>
Source§impl TensorReduction for WebGpuBackend
impl TensorReduction for WebGpuBackend
Source§fn reduce_prod(&mut self, _input: &Tensor, _axes: &[usize]) -> Result<Tensor>
fn reduce_prod(&mut self, _input: &Tensor, _axes: &[usize]) -> Result<Tensor>
Source§fn reduce_sum_read(
&mut self,
input: TensorRead<'_>,
axes: &[usize],
) -> Result<Tensor, Error>
fn reduce_sum_read( &mut self, input: TensorRead<'_>, axes: &[usize], ) -> Result<Tensor, Error>
Source§fn reduce_prod_read(
&mut self,
input: TensorRead<'_>,
axes: &[usize],
) -> Result<Tensor, Error>
fn reduce_prod_read( &mut self, input: TensorRead<'_>, axes: &[usize], ) -> Result<Tensor, Error>
Source§fn reduce_max_read(
&mut self,
input: TensorRead<'_>,
axes: &[usize],
) -> Result<Tensor, Error>
fn reduce_max_read( &mut self, input: TensorRead<'_>, axes: &[usize], ) -> Result<Tensor, Error>
Source§fn reduce_min_read(
&mut self,
input: TensorRead<'_>,
axes: &[usize],
) -> Result<Tensor, Error>
fn reduce_min_read( &mut self, input: TensorRead<'_>, axes: &[usize], ) -> Result<Tensor, Error>
Source§impl TensorStructural for WebGpuBackend
impl TensorStructural for WebGpuBackend
Source§fn to_contiguous_read(&mut self, input: TensorRead<'_>) -> Result<Tensor>
fn to_contiguous_read(&mut self, input: TensorRead<'_>) -> Result<Tensor>
Source§fn copy_read_into(
&mut self,
_src: TensorRead<'_>,
_dst: TensorWrite<'_>,
) -> Result<()>
fn copy_read_into( &mut self, _src: TensorRead<'_>, _dst: TensorWrite<'_>, ) -> Result<()>
Source§fn broadcast_in_dim(
&mut self,
_input: &Tensor,
_shape: &[usize],
_dims: &[usize],
) -> Result<Tensor>
fn broadcast_in_dim( &mut self, _input: &Tensor, _shape: &[usize], _dims: &[usize], ) -> Result<Tensor>
Source§fn cast(&mut self, _input: &Tensor, _to: DType) -> Result<Tensor>
fn cast(&mut self, _input: &Tensor, _to: DType) -> Result<Tensor>
Source§fn extract_diagonal(
&mut self,
_input: &Tensor,
_axis_a: usize,
_axis_b: usize,
) -> Result<Tensor>
fn extract_diagonal( &mut self, _input: &Tensor, _axis_a: usize, _axis_b: usize, ) -> Result<Tensor>
Source§fn embed_diagonal(
&mut self,
_input: &Tensor,
_axis_a: usize,
_axis_b: usize,
) -> Result<Tensor>
fn embed_diagonal( &mut self, _input: &Tensor, _axis_a: usize, _axis_b: usize, ) -> Result<Tensor>
Source§fn transpose_read(
&mut self,
input: TensorRead<'_>,
perm: &[usize],
) -> Result<Tensor, Error>
fn transpose_read( &mut self, input: TensorRead<'_>, perm: &[usize], ) -> Result<Tensor, Error>
Source§fn reshape_read(
&mut self,
input: TensorRead<'_>,
shape: &[usize],
) -> Result<Tensor, Error>
fn reshape_read( &mut self, input: TensorRead<'_>, shape: &[usize], ) -> Result<Tensor, Error>
Source§fn broadcast_in_dim_read(
&mut self,
input: TensorRead<'_>,
shape: &[usize],
dims: &[usize],
) -> Result<Tensor, Error>
fn broadcast_in_dim_read( &mut self, input: TensorRead<'_>, shape: &[usize], dims: &[usize], ) -> Result<Tensor, Error>
Source§impl TensorViewCanonicalization<f32, DynRank> for WebGpuBackend
impl TensorViewCanonicalization<f32, DynRank> for WebGpuBackend
Source§fn to_contiguous(
&mut self,
view: &TypedTensorView<'_, f32>,
) -> Result<TypedTensor<f32>>
fn to_contiguous( &mut self, view: &TypedTensorView<'_, f32>, ) -> Result<TypedTensor<f32>>
Source§fn copy_into(
&mut self,
_src: &TypedTensorView<'_, f32>,
_dst: &mut TypedTensorViewMut<'_, f32>,
) -> Result<()>
fn copy_into( &mut self, _src: &TypedTensorView<'_, f32>, _dst: &mut TypedTensorViewMut<'_, f32>, ) -> Result<()>
Auto Trait Implementations§
impl !RefUnwindSafe for WebGpuBackend
impl !UnwindSafe for WebGpuBackend
impl Freeze for WebGpuBackend
impl Send for WebGpuBackend
impl Sync for WebGpuBackend
impl Unpin for WebGpuBackend
impl UnsafeUnpin for WebGpuBackend
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> FaerParallelismExt for Swhere
S: BackendSession + ?Sized,
impl<S> FaerParallelismExt for Swhere
S: BackendSession + ?Sized,
impl<T, U> Imply<T> for U
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