pub struct LinearCombination<F>where
F: PrimeField,{ /* private fields */ }
Implementations§
Source§impl<F> LinearCombination<F>where
F: PrimeField,
impl<F> LinearCombination<F>where
F: PrimeField,
Sourcepub fn is_constant(&self) -> bool
pub fn is_constant(&self) -> bool
Returns true
if there are no terms in the linear combination.
Sourcepub fn is_public(&self) -> bool
pub fn is_public(&self) -> bool
Returns true
if there is exactly one term with a coefficient of one,
and the term contains a public variable.
Sourcepub fn is_private(&self) -> bool
pub fn is_private(&self) -> bool
Returns true
if the linear combination is not constant or public.
Sourcepub fn is_boolean_type(&self) -> bool
pub fn is_boolean_type(&self) -> bool
Returns true
if the linear combination represents a Boolean
type,
and is well-formed.
Properties:
- Either
constant
orterms
is utilized, however never both. - Every individual variable in the linear combination must always be either
0
or1
. - The value of the linear combination must always be either
0
or1
.
Trait Implementations§
Source§impl<F> Add<&LinearCombination<F>> for &LinearCombination<F>where
F: PrimeField,
impl<F> Add<&LinearCombination<F>> for &LinearCombination<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
+
operator.Source§fn add(
self,
other: &LinearCombination<F>,
) -> <&LinearCombination<F> as Add<&LinearCombination<F>>>::Output
fn add( self, other: &LinearCombination<F>, ) -> <&LinearCombination<F> as Add<&LinearCombination<F>>>::Output
Performs the
+
operation. Read moreSource§impl<F> Add<&LinearCombination<F>> for &Variable<F>where
F: PrimeField,
impl<F> Add<&LinearCombination<F>> for &Variable<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
+
operator.Source§fn add(
self,
other: &LinearCombination<F>,
) -> <&Variable<F> as Add<&LinearCombination<F>>>::Output
fn add( self, other: &LinearCombination<F>, ) -> <&Variable<F> as Add<&LinearCombination<F>>>::Output
Performs the
+
operation. Read moreSource§impl<F> Add<&LinearCombination<F>> for LinearCombination<F>where
F: PrimeField,
impl<F> Add<&LinearCombination<F>> for LinearCombination<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
+
operator.Source§fn add(
self,
other: &LinearCombination<F>,
) -> <LinearCombination<F> as Add<&LinearCombination<F>>>::Output
fn add( self, other: &LinearCombination<F>, ) -> <LinearCombination<F> as Add<&LinearCombination<F>>>::Output
Performs the
+
operation. Read moreSource§impl<F> Add<&LinearCombination<F>> for Variable<F>where
F: PrimeField,
impl<F> Add<&LinearCombination<F>> for Variable<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
+
operator.Source§fn add(
self,
other: &LinearCombination<F>,
) -> <Variable<F> as Add<&LinearCombination<F>>>::Output
fn add( self, other: &LinearCombination<F>, ) -> <Variable<F> as Add<&LinearCombination<F>>>::Output
Performs the
+
operation. Read moreSource§impl<F> Add<&Variable<F>> for LinearCombination<F>where
F: PrimeField,
impl<F> Add<&Variable<F>> for LinearCombination<F>where
F: PrimeField,
Source§impl<F> Add<LinearCombination<F>> for &LinearCombination<F>where
F: PrimeField,
impl<F> Add<LinearCombination<F>> for &LinearCombination<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
+
operator.Source§fn add(
self,
other: LinearCombination<F>,
) -> <&LinearCombination<F> as Add<LinearCombination<F>>>::Output
fn add( self, other: LinearCombination<F>, ) -> <&LinearCombination<F> as Add<LinearCombination<F>>>::Output
Performs the
+
operation. Read moreSource§impl<F> Add<LinearCombination<F>> for &Variable<F>where
F: PrimeField,
impl<F> Add<LinearCombination<F>> for &Variable<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
+
operator.Source§fn add(
self,
other: LinearCombination<F>,
) -> <&Variable<F> as Add<LinearCombination<F>>>::Output
fn add( self, other: LinearCombination<F>, ) -> <&Variable<F> as Add<LinearCombination<F>>>::Output
Performs the
+
operation. Read moreSource§impl<F> Add<LinearCombination<F>> for Variable<F>where
F: PrimeField,
impl<F> Add<LinearCombination<F>> for Variable<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
+
operator.Source§fn add(
self,
other: LinearCombination<F>,
) -> <Variable<F> as Add<LinearCombination<F>>>::Output
fn add( self, other: LinearCombination<F>, ) -> <Variable<F> as Add<LinearCombination<F>>>::Output
Performs the
+
operation. Read moreSource§impl<F> Add<Variable<F>> for &LinearCombination<F>where
F: PrimeField,
impl<F> Add<Variable<F>> for &LinearCombination<F>where
F: PrimeField,
Source§impl<F> Add<Variable<F>> for LinearCombination<F>where
F: PrimeField,
impl<F> Add<Variable<F>> for LinearCombination<F>where
F: PrimeField,
Source§impl<F> Add for LinearCombination<F>where
F: PrimeField,
impl<F> Add for LinearCombination<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
+
operator.Source§fn add(
self,
other: LinearCombination<F>,
) -> <LinearCombination<F> as Add>::Output
fn add( self, other: LinearCombination<F>, ) -> <LinearCombination<F> as Add>::Output
Performs the
+
operation. Read moreSource§impl<F> AddAssign<&LinearCombination<F>> for LinearCombination<F>where
F: PrimeField,
impl<F> AddAssign<&LinearCombination<F>> for LinearCombination<F>where
F: PrimeField,
Source§fn add_assign(&mut self, other: &LinearCombination<F>)
fn add_assign(&mut self, other: &LinearCombination<F>)
Performs the
+=
operation. Read moreSource§impl<F> AddAssign for LinearCombination<F>where
F: PrimeField,
impl<F> AddAssign for LinearCombination<F>where
F: PrimeField,
Source§fn add_assign(&mut self, other: LinearCombination<F>)
fn add_assign(&mut self, other: LinearCombination<F>)
Performs the
+=
operation. Read moreSource§impl<F> Clone for LinearCombination<F>where
F: Clone + PrimeField,
impl<F> Clone for LinearCombination<F>where
F: Clone + PrimeField,
Source§fn clone(&self) -> LinearCombination<F>
fn clone(&self) -> LinearCombination<F>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<F> Debug for LinearCombination<F>where
F: PrimeField,
impl<F> Debug for LinearCombination<F>where
F: PrimeField,
Source§impl<F> Display for LinearCombination<F>where
F: PrimeField,
impl<F> Display for LinearCombination<F>where
F: PrimeField,
Source§impl<F> From<&[Variable<F>]> for LinearCombination<F>where
F: PrimeField,
impl<F> From<&[Variable<F>]> for LinearCombination<F>where
F: PrimeField,
Source§fn from(variables: &[Variable<F>]) -> LinearCombination<F>
fn from(variables: &[Variable<F>]) -> LinearCombination<F>
Converts to this type from the input type.
Source§impl<F, const N: usize> From<&[Variable<F>; N]> for LinearCombination<F>where
F: PrimeField,
impl<F, const N: usize> From<&[Variable<F>; N]> for LinearCombination<F>where
F: PrimeField,
Source§impl<E> From<&Address<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
impl<E> From<&Address<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
Source§fn from(
address: &Address<E>,
) -> LinearCombination<<E as Environment>::BaseField>
fn from( address: &Address<E>, ) -> LinearCombination<<E as Environment>::BaseField>
Converts to this type from the input type.
Source§impl<E> From<&Boolean<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
impl<E> From<&Boolean<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
Source§fn from(
boolean: &Boolean<E>,
) -> LinearCombination<<E as Environment>::BaseField>
fn from( boolean: &Boolean<E>, ) -> LinearCombination<<E as Environment>::BaseField>
Converts to this type from the input type.
Source§impl<E> From<&Field<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
impl<E> From<&Field<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
Source§fn from(field: &Field<E>) -> LinearCombination<<E as Environment>::BaseField>
fn from(field: &Field<E>) -> LinearCombination<<E as Environment>::BaseField>
Converts to this type from the input type.
Source§impl<E> From<&Group<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
impl<E> From<&Group<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
Source§fn from(group: &Group<E>) -> LinearCombination<<E as Environment>::BaseField>
fn from(group: &Group<E>) -> LinearCombination<<E as Environment>::BaseField>
Converts to this type from the input type.
Source§impl<A> From<&Identifier<A>> for LinearCombination<<A as Environment>::BaseField>where
A: Aleo,
impl<A> From<&Identifier<A>> for LinearCombination<<A as Environment>::BaseField>where
A: Aleo,
Source§fn from(
identifier: &Identifier<A>,
) -> LinearCombination<<A as Environment>::BaseField>
fn from( identifier: &Identifier<A>, ) -> LinearCombination<<A as Environment>::BaseField>
Note: Identifier is always Mode::Constant
.
Source§impl<E, I> From<&Integer<E, I>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
I: IntegerType,
impl<E, I> From<&Integer<E, I>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
I: IntegerType,
Source§fn from(
integer: &Integer<E, I>,
) -> LinearCombination<<E as Environment>::BaseField>
fn from( integer: &Integer<E, I>, ) -> LinearCombination<<E as Environment>::BaseField>
Converts to this type from the input type.
Source§impl<E> From<&LinearCombination<<E as Environment>::BaseField>> for Field<E>where
E: Environment,
impl<E> From<&LinearCombination<<E as Environment>::BaseField>> for Field<E>where
E: Environment,
Source§fn from(
linear_combination: &LinearCombination<<E as Environment>::BaseField>,
) -> Field<E>
fn from( linear_combination: &LinearCombination<<E as Environment>::BaseField>, ) -> Field<E>
Converts to this type from the input type.
Source§impl<E> From<&Scalar<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
impl<E> From<&Scalar<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
Source§fn from(scalar: &Scalar<E>) -> LinearCombination<<E as Environment>::BaseField>
fn from(scalar: &Scalar<E>) -> LinearCombination<<E as Environment>::BaseField>
Converts to this type from the input type.
Source§impl<F> From<&Variable<F>> for LinearCombination<F>where
F: PrimeField,
impl<F> From<&Variable<F>> for LinearCombination<F>where
F: PrimeField,
Source§fn from(variable: &Variable<F>) -> LinearCombination<F>
fn from(variable: &Variable<F>) -> LinearCombination<F>
Converts to this type from the input type.
Source§impl<F> From<&Vec<Variable<F>>> for LinearCombination<F>where
F: PrimeField,
impl<F> From<&Vec<Variable<F>>> for LinearCombination<F>where
F: PrimeField,
Source§impl<F, const N: usize> From<[Variable<F>; N]> for LinearCombination<F>where
F: PrimeField,
impl<F, const N: usize> From<[Variable<F>; N]> for LinearCombination<F>where
F: PrimeField,
Source§impl<E> From<Address<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
impl<E> From<Address<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
Source§fn from(address: Address<E>) -> LinearCombination<<E as Environment>::BaseField>
fn from(address: Address<E>) -> LinearCombination<<E as Environment>::BaseField>
Converts to this type from the input type.
Source§impl<E> From<Boolean<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
impl<E> From<Boolean<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
Source§fn from(boolean: Boolean<E>) -> LinearCombination<<E as Environment>::BaseField>
fn from(boolean: Boolean<E>) -> LinearCombination<<E as Environment>::BaseField>
Converts to this type from the input type.
Source§impl<E> From<Field<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
impl<E> From<Field<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
Source§fn from(field: Field<E>) -> LinearCombination<<E as Environment>::BaseField>
fn from(field: Field<E>) -> LinearCombination<<E as Environment>::BaseField>
Converts to this type from the input type.
Source§impl<E> From<Group<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
impl<E> From<Group<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
Source§fn from(group: Group<E>) -> LinearCombination<<E as Environment>::BaseField>
fn from(group: Group<E>) -> LinearCombination<<E as Environment>::BaseField>
Converts to this type from the input type.
Source§impl<A> From<Identifier<A>> for LinearCombination<<A as Environment>::BaseField>where
A: Aleo,
impl<A> From<Identifier<A>> for LinearCombination<<A as Environment>::BaseField>where
A: Aleo,
Source§fn from(
identifier: Identifier<A>,
) -> LinearCombination<<A as Environment>::BaseField>
fn from( identifier: Identifier<A>, ) -> LinearCombination<<A as Environment>::BaseField>
Note: Identifier is always Mode::Constant
.
Source§impl<E, I> From<Integer<E, I>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
I: IntegerType,
impl<E, I> From<Integer<E, I>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
I: IntegerType,
Source§fn from(
integer: Integer<E, I>,
) -> LinearCombination<<E as Environment>::BaseField>
fn from( integer: Integer<E, I>, ) -> LinearCombination<<E as Environment>::BaseField>
Converts to this type from the input type.
Source§impl<E> From<LinearCombination<<E as Environment>::BaseField>> for Field<E>where
E: Environment,
impl<E> From<LinearCombination<<E as Environment>::BaseField>> for Field<E>where
E: Environment,
Source§fn from(
linear_combination: LinearCombination<<E as Environment>::BaseField>,
) -> Field<E>
fn from( linear_combination: LinearCombination<<E as Environment>::BaseField>, ) -> Field<E>
Converts to this type from the input type.
Source§impl<E> From<Scalar<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
impl<E> From<Scalar<E>> for LinearCombination<<E as Environment>::BaseField>where
E: Environment,
Source§fn from(scalar: Scalar<E>) -> LinearCombination<<E as Environment>::BaseField>
fn from(scalar: Scalar<E>) -> LinearCombination<<E as Environment>::BaseField>
Converts to this type from the input type.
Source§impl<F> From<Variable<F>> for LinearCombination<F>where
F: PrimeField,
impl<F> From<Variable<F>> for LinearCombination<F>where
F: PrimeField,
Source§fn from(variable: Variable<F>) -> LinearCombination<F>
fn from(variable: Variable<F>) -> LinearCombination<F>
Converts to this type from the input type.
Source§impl<F> From<Vec<Variable<F>>> for LinearCombination<F>where
F: PrimeField,
impl<F> From<Vec<Variable<F>>> for LinearCombination<F>where
F: PrimeField,
Source§impl<F> Hash for LinearCombination<F>where
F: Hash + PrimeField,
impl<F> Hash for LinearCombination<F>where
F: Hash + PrimeField,
Source§impl<F> Mul<&F> for &LinearCombination<F>where
F: PrimeField,
impl<F> Mul<&F> for &LinearCombination<F>where
F: PrimeField,
Source§impl<F> Mul<&F> for LinearCombination<F>where
F: PrimeField,
impl<F> Mul<&F> for LinearCombination<F>where
F: PrimeField,
Source§impl<F> Mul<F> for &LinearCombination<F>where
F: PrimeField,
impl<F> Mul<F> for &LinearCombination<F>where
F: PrimeField,
Source§impl<F> Mul<F> for LinearCombination<F>where
F: PrimeField,
impl<F> Mul<F> for LinearCombination<F>where
F: PrimeField,
Source§impl<F> Neg for &LinearCombination<F>where
F: PrimeField,
impl<F> Neg for &LinearCombination<F>where
F: PrimeField,
Source§impl<F> Neg for LinearCombination<F>where
F: PrimeField,
impl<F> Neg for LinearCombination<F>where
F: PrimeField,
Source§impl<F> Sub<&LinearCombination<F>> for &LinearCombination<F>where
F: PrimeField,
impl<F> Sub<&LinearCombination<F>> for &LinearCombination<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
-
operator.Source§fn sub(
self,
other: &LinearCombination<F>,
) -> <&LinearCombination<F> as Sub<&LinearCombination<F>>>::Output
fn sub( self, other: &LinearCombination<F>, ) -> <&LinearCombination<F> as Sub<&LinearCombination<F>>>::Output
Performs the
-
operation. Read moreSource§impl<F> Sub<&LinearCombination<F>> for &Variable<F>where
F: PrimeField,
impl<F> Sub<&LinearCombination<F>> for &Variable<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
-
operator.Source§fn sub(
self,
other: &LinearCombination<F>,
) -> <&Variable<F> as Sub<&LinearCombination<F>>>::Output
fn sub( self, other: &LinearCombination<F>, ) -> <&Variable<F> as Sub<&LinearCombination<F>>>::Output
Performs the
-
operation. Read moreSource§impl<F> Sub<&LinearCombination<F>> for LinearCombination<F>where
F: PrimeField,
impl<F> Sub<&LinearCombination<F>> for LinearCombination<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
-
operator.Source§fn sub(
self,
other: &LinearCombination<F>,
) -> <LinearCombination<F> as Sub<&LinearCombination<F>>>::Output
fn sub( self, other: &LinearCombination<F>, ) -> <LinearCombination<F> as Sub<&LinearCombination<F>>>::Output
Performs the
-
operation. Read moreSource§impl<F> Sub<&LinearCombination<F>> for Variable<F>where
F: PrimeField,
impl<F> Sub<&LinearCombination<F>> for Variable<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
-
operator.Source§fn sub(
self,
other: &LinearCombination<F>,
) -> <Variable<F> as Sub<&LinearCombination<F>>>::Output
fn sub( self, other: &LinearCombination<F>, ) -> <Variable<F> as Sub<&LinearCombination<F>>>::Output
Performs the
-
operation. Read moreSource§impl<F> Sub<&Variable<F>> for LinearCombination<F>where
F: PrimeField,
impl<F> Sub<&Variable<F>> for LinearCombination<F>where
F: PrimeField,
Source§impl<F> Sub<LinearCombination<F>> for &LinearCombination<F>where
F: PrimeField,
impl<F> Sub<LinearCombination<F>> for &LinearCombination<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
-
operator.Source§fn sub(
self,
other: LinearCombination<F>,
) -> <&LinearCombination<F> as Sub<LinearCombination<F>>>::Output
fn sub( self, other: LinearCombination<F>, ) -> <&LinearCombination<F> as Sub<LinearCombination<F>>>::Output
Performs the
-
operation. Read moreSource§impl<F> Sub<LinearCombination<F>> for &Variable<F>where
F: PrimeField,
impl<F> Sub<LinearCombination<F>> for &Variable<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
-
operator.Source§fn sub(
self,
other: LinearCombination<F>,
) -> <&Variable<F> as Sub<LinearCombination<F>>>::Output
fn sub( self, other: LinearCombination<F>, ) -> <&Variable<F> as Sub<LinearCombination<F>>>::Output
Performs the
-
operation. Read moreSource§impl<F> Sub<LinearCombination<F>> for Variable<F>where
F: PrimeField,
impl<F> Sub<LinearCombination<F>> for Variable<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
-
operator.Source§fn sub(
self,
other: LinearCombination<F>,
) -> <Variable<F> as Sub<LinearCombination<F>>>::Output
fn sub( self, other: LinearCombination<F>, ) -> <Variable<F> as Sub<LinearCombination<F>>>::Output
Performs the
-
operation. Read moreSource§impl<F> Sub<Variable<F>> for &LinearCombination<F>where
F: PrimeField,
impl<F> Sub<Variable<F>> for &LinearCombination<F>where
F: PrimeField,
Source§impl<F> Sub<Variable<F>> for LinearCombination<F>where
F: PrimeField,
impl<F> Sub<Variable<F>> for LinearCombination<F>where
F: PrimeField,
Source§impl<F> Sub for LinearCombination<F>where
F: PrimeField,
impl<F> Sub for LinearCombination<F>where
F: PrimeField,
Source§type Output = LinearCombination<F>
type Output = LinearCombination<F>
The resulting type after applying the
-
operator.Source§fn sub(
self,
other: LinearCombination<F>,
) -> <LinearCombination<F> as Sub>::Output
fn sub( self, other: LinearCombination<F>, ) -> <LinearCombination<F> as Sub>::Output
Performs the
-
operation. Read moreAuto Trait Implementations§
impl<F> Freeze for LinearCombination<F>where
F: Freeze,
impl<F> RefUnwindSafe for LinearCombination<F>where
F: RefUnwindSafe,
impl<F> Send for LinearCombination<F>
impl<F> Sync for LinearCombination<F>
impl<F> Unpin for LinearCombination<F>where
F: Unpin,
impl<F> UnwindSafe for LinearCombination<F>where
F: UnwindSafe + RefUnwindSafe,
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more