pub struct Projective<P: DOCurveConfig> {
pub e: P::BaseField,
pub z: P::BaseField,
pub u: P::BaseField,
pub t: P::BaseField,
}Expand description
Fractional coordinates as utilised in https://doubleodd.group/doubleodd-jq.pdf, but first defined in https://www.sciencedirect.com/science/article/pii/S0020019007001433. Affine point (e,u) is represented as (E:Z:U:T) such that:
- Z != 0
- e = E/Z
- u = U/Z
- u**2 / T/Z
Fields§
§e: P::BaseFieldE / Z projection of the affine e
z: P::BaseFieldProjective multiplicative inverse.
u: P::BaseFieldU / Z projection of the affine u
t: P::BaseFieldAdditional formula for faster addition: T = U^2/Z
Implementations§
Source§impl<P: DOCurveConfig> Projective<P>
impl<P: DOCurveConfig> Projective<P>
Trait Implementations§
Source§impl<'a, 'b, P: DOCurveConfig> Add<&'a Projective<P>> for &'b Projective<P>
impl<'a, 'b, P: DOCurveConfig> Add<&'a Projective<P>> for &'b Projective<P>
Source§type Output = Projective<P>
type Output = Projective<P>
The resulting type after applying the
+ operator.Source§fn add(self, other: &'a Projective<P>) -> Projective<P>
fn add(self, other: &'a Projective<P>) -> Projective<P>
Performs the
+ operation. Read moreSource§impl<'a, P: DOCurveConfig> Add<&'a Projective<P>> for Affine<P>
impl<'a, P: DOCurveConfig> Add<&'a Projective<P>> for Affine<P>
Source§type Output = Projective<P>
type Output = Projective<P>
The resulting type after applying the
+ operator.Source§fn add(self, other: &'a Projective<P>) -> Projective<P>
fn add(self, other: &'a Projective<P>) -> Projective<P>
Performs the
+ operation. Read moreSource§impl<'a, P: DOCurveConfig> Add<&'a Projective<P>> for Projective<P>
impl<'a, P: DOCurveConfig> Add<&'a Projective<P>> for Projective<P>
Source§impl<'a, 'b, P: DOCurveConfig> Add<&'a mut Projective<P>> for &'b Projective<P>
impl<'a, 'b, P: DOCurveConfig> Add<&'a mut Projective<P>> for &'b Projective<P>
Source§type Output = Projective<P>
type Output = Projective<P>
The resulting type after applying the
+ operator.Source§fn add(self, other: &'a mut Projective<P>) -> Projective<P>
fn add(self, other: &'a mut Projective<P>) -> Projective<P>
Performs the
+ operation. Read moreSource§impl<'a, P: DOCurveConfig> Add<&'a mut Projective<P>> for Projective<P>
impl<'a, P: DOCurveConfig> Add<&'a mut Projective<P>> for Projective<P>
Source§impl<'b, P: DOCurveConfig> Add<Projective<P>> for &'b Projective<P>
impl<'b, P: DOCurveConfig> Add<Projective<P>> for &'b Projective<P>
Source§type Output = Projective<P>
type Output = Projective<P>
The resulting type after applying the
+ operator.Source§fn add(self, other: Projective<P>) -> Projective<P>
fn add(self, other: Projective<P>) -> Projective<P>
Performs the
+ operation. Read moreSource§impl<P: DOCurveConfig> Add<Projective<P>> for Affine<P>
impl<P: DOCurveConfig> Add<Projective<P>> for Affine<P>
Source§type Output = Projective<P>
type Output = Projective<P>
The resulting type after applying the
+ operator.Source§fn add(self, other: Projective<P>) -> Projective<P>
fn add(self, other: Projective<P>) -> Projective<P>
Performs the
+ operation. Read moreSource§impl<P: DOCurveConfig, T: Borrow<Affine<P>>> Add<T> for Projective<P>
impl<P: DOCurveConfig, T: Borrow<Affine<P>>> Add<T> for Projective<P>
Source§impl<P: DOCurveConfig> Add for Projective<P>
impl<P: DOCurveConfig> Add for Projective<P>
Source§impl<'a, P: DOCurveConfig> AddAssign<&'a Projective<P>> for Projective<P>
impl<'a, P: DOCurveConfig> AddAssign<&'a Projective<P>> for Projective<P>
Source§fn add_assign(&mut self, other: &'a Self)
fn add_assign(&mut self, other: &'a Self)
Using Algorithm 3 from https://doubleodd.group/doubleodd-jq.pdf.
Source§impl<'a, P: DOCurveConfig> AddAssign<&'a mut Projective<P>> for Projective<P>
impl<'a, P: DOCurveConfig> AddAssign<&'a mut Projective<P>> for Projective<P>
Source§fn add_assign(&mut self, other: &'a mut Self)
fn add_assign(&mut self, other: &'a mut Self)
Performs the
+= operation. Read moreSource§impl<P: DOCurveConfig, T: Borrow<Affine<P>>> AddAssign<T> for Projective<P>
impl<P: DOCurveConfig, T: Borrow<Affine<P>>> AddAssign<T> for Projective<P>
Source§fn add_assign(&mut self, other: T)
fn add_assign(&mut self, other: T)
Using Algorithm 3 from https://doubleodd.group/doubleodd-jq.pdf, simplified because the second point is affine (n2 = Z1, n5 = Z1*T2 + T1).
Source§impl<P: DOCurveConfig> AddAssign for Projective<P>
impl<P: DOCurveConfig> AddAssign for Projective<P>
Source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+= operation. Read moreSource§impl<P: DOCurveConfig> AdditiveGroup for Projective<P>
impl<P: DOCurveConfig> AdditiveGroup for Projective<P>
type Scalar = <P as CurveConfig>::ScalarField
Source§fn double_in_place(&mut self) -> &mut Self
fn double_in_place(&mut self) -> &mut Self
Doubles
self in place.Source§fn neg_in_place(&mut self) -> &mut Self
fn neg_in_place(&mut self) -> &mut Self
Negates
self in place.Source§impl<P: DOCurveConfig> CanonicalDeserialize for Projective<P>
impl<P: DOCurveConfig> CanonicalDeserialize for Projective<P>
Source§fn deserialize_with_mode<R: Read>(
reader: R,
compress: Compress,
validate: Validate,
) -> Result<Self, SerializationError>
fn deserialize_with_mode<R: Read>( reader: R, compress: Compress, validate: Validate, ) -> Result<Self, SerializationError>
The general deserialize method that takes in customization flags.
Source§fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
Reads
Self from reader using the compressed form if applicable.
Performs validation if applicable.Source§fn deserialize_compressed_unchecked<R>(
reader: R,
) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_compressed_unchecked<R>(
reader: R,
) -> Result<Self, SerializationError>where
R: Read,
Reads
Self from reader using the compressed form if applicable, without validating the
deserialized value. Read moreSource§fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
Reads
Self from reader using the uncompressed form. Performs validation if applicable.Source§fn deserialize_uncompressed_unchecked<R>(
reader: R,
) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed_unchecked<R>(
reader: R,
) -> Result<Self, SerializationError>where
R: Read,
Reads
Self from reader using the uncompressed form, without validating the deserialized
value. Read moreSource§impl<P: DOCurveConfig> CanonicalSerialize for Projective<P>
impl<P: DOCurveConfig> CanonicalSerialize for Projective<P>
Source§fn serialize_with_mode<W: Write>(
&self,
writer: W,
compress: Compress,
) -> Result<(), SerializationError>
fn serialize_with_mode<W: Write>( &self, writer: W, compress: Compress, ) -> Result<(), SerializationError>
The general serialize method that takes in customization flags.
Source§fn serialized_size(&self, compress: Compress) -> usize
fn serialized_size(&self, compress: Compress) -> usize
Returns the size in bytes of the serialized version of
self with the given compression mode.Source§fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
Serializes
self into writer using the compressed form if applicable.Source§fn compressed_size(&self) -> usize
fn compressed_size(&self) -> usize
Returns the size in bytes of the compressed serialized version of
self.Source§fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
Serializes
self into writer using the uncompressed form.Source§fn uncompressed_size(&self) -> usize
fn uncompressed_size(&self) -> usize
Returns the size in bytes of the uncompressed serialized version of
self.Source§impl<P: DOCurveConfig> Clone for Projective<P>
impl<P: DOCurveConfig> Clone for Projective<P>
Source§impl<P: DOCurveConfig> CurveGroup for Projective<P>
impl<P: DOCurveConfig> CurveGroup for Projective<P>
type Config = P
Source§type BaseField = <P as CurveConfig>::BaseField
type BaseField = <P as CurveConfig>::BaseField
The field over which this curve is defined.
Source§type FullGroup = Affine<P>
type FullGroup = Affine<P>
Type representing an element of the full elliptic curve group, not just the
prime order subgroup.
Source§fn normalize_batch(v: &[Self]) -> Vec<Self::Affine>
fn normalize_batch(v: &[Self]) -> Vec<Self::Affine>
Normalizes a slice of group elements into affine.
Source§fn into_affine(self) -> Self::Affine
fn into_affine(self) -> Self::Affine
Converts
self into the affine representation.Source§impl<P: DOCurveConfig> Debug for Projective<P>
impl<P: DOCurveConfig> Debug for Projective<P>
Source§impl<P: DOCurveConfig> Default for Projective<P>
impl<P: DOCurveConfig> Default for Projective<P>
Source§impl<P: DOCurveConfig> Display for Projective<P>
impl<P: DOCurveConfig> Display for Projective<P>
Source§impl<P: DOCurveConfig> Distribution<Projective<P>> for Standard
impl<P: DOCurveConfig> Distribution<Projective<P>> for Standard
Source§impl<P: DOCurveConfig> From<Affine<P>> for Projective<P>
impl<P: DOCurveConfig> From<Affine<P>> for Projective<P>
Source§impl<P: DOCurveConfig> From<Projective<P>> for Affine<P>
impl<P: DOCurveConfig> From<Projective<P>> for Affine<P>
Source§fn from(p: Projective<P>) -> Self
fn from(p: Projective<P>) -> Self
Converts to this type from the input type.
Source§impl<P: DOCurveConfig> Hash for Projective<P>
impl<P: DOCurveConfig> Hash for Projective<P>
Source§impl<P: DOCurveConfig, T: Borrow<P::ScalarField>> Mul<T> for Projective<P>
impl<P: DOCurveConfig, T: Borrow<P::ScalarField>> Mul<T> for Projective<P>
Source§impl<P: DOCurveConfig, T: Borrow<P::ScalarField>> MulAssign<T> for Projective<P>
impl<P: DOCurveConfig, T: Borrow<P::ScalarField>> MulAssign<T> for Projective<P>
Source§fn mul_assign(&mut self, other: T)
fn mul_assign(&mut self, other: T)
Performs the
*= operation. Read moreSource§impl<P: DOCurveConfig> Neg for Projective<P>
impl<P: DOCurveConfig> Neg for Projective<P>
Source§impl<P: DOCurveConfig> PartialEq<Affine<P>> for Projective<P>
impl<P: DOCurveConfig> PartialEq<Affine<P>> for Projective<P>
Source§impl<P: DOCurveConfig> PartialEq<Projective<P>> for Affine<P>
impl<P: DOCurveConfig> PartialEq<Projective<P>> for Affine<P>
Source§fn eq(&self, other: &Projective<P>) -> bool
fn eq(&self, other: &Projective<P>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<P: DOCurveConfig> PartialEq for Projective<P>
impl<P: DOCurveConfig> PartialEq for Projective<P>
Source§impl<P: DOCurveConfig> PrimeGroup for Projective<P>
impl<P: DOCurveConfig> PrimeGroup for Projective<P>
Source§type ScalarField = <P as CurveConfig>::ScalarField
type ScalarField = <P as CurveConfig>::ScalarField
The scalar field
F_r, where r is the order of this group.Source§fn mul_bigint(&self, other: impl AsRef<[u64]>) -> Self
fn mul_bigint(&self, other: impl AsRef<[u64]>) -> Self
Performs scalar multiplication of this element.
Source§fn mul_bits_be(&self, other: impl Iterator<Item = bool>) -> Self
fn mul_bits_be(&self, other: impl Iterator<Item = bool>) -> Self
Computes
other * self, where other is a big-endian
bit representation of some integer.Source§impl<P: DOCurveConfig> ScalarMul for Projective<P>
impl<P: DOCurveConfig> ScalarMul for Projective<P>
const NEGATION_IS_CHEAP: bool = true
type MulBase = Affine<P>
fn batch_convert_to_mul_base(bases: &[Self]) -> Vec<Self::MulBase>
Source§fn batch_mul(self, v: &[Self::ScalarField]) -> Vec<Self::MulBase>
fn batch_mul(self, v: &[Self::ScalarField]) -> Vec<Self::MulBase>
Compute the vector v[0].G, v[1].G, …, v[n-1].G, given: Read more
Source§fn batch_mul_with_preprocessing(
table: &BatchMulPreprocessing<Self>,
v: &[Self::ScalarField],
) -> Vec<Self::MulBase>
fn batch_mul_with_preprocessing( table: &BatchMulPreprocessing<Self>, v: &[Self::ScalarField], ) -> Vec<Self::MulBase>
Compute the vector v[0].G, v[1].G, …, v[n-1].G, given: Read more
Source§impl<'a, 'b, P: DOCurveConfig> Sub<&'a Projective<P>> for &'b Projective<P>
impl<'a, 'b, P: DOCurveConfig> Sub<&'a Projective<P>> for &'b Projective<P>
Source§type Output = Projective<P>
type Output = Projective<P>
The resulting type after applying the
- operator.Source§fn sub(self, other: &'a Projective<P>) -> Projective<P>
fn sub(self, other: &'a Projective<P>) -> Projective<P>
Performs the
- operation. Read moreSource§impl<'a, P: DOCurveConfig> Sub<&'a Projective<P>> for Affine<P>
impl<'a, P: DOCurveConfig> Sub<&'a Projective<P>> for Affine<P>
Source§type Output = Projective<P>
type Output = Projective<P>
The resulting type after applying the
- operator.Source§fn sub(self, other: &'a Projective<P>) -> Projective<P>
fn sub(self, other: &'a Projective<P>) -> Projective<P>
Performs the
- operation. Read moreSource§impl<'a, P: DOCurveConfig> Sub<&'a Projective<P>> for Projective<P>
impl<'a, P: DOCurveConfig> Sub<&'a Projective<P>> for Projective<P>
Source§impl<'a, 'b, P: DOCurveConfig> Sub<&'a mut Projective<P>> for &'b Projective<P>
impl<'a, 'b, P: DOCurveConfig> Sub<&'a mut Projective<P>> for &'b Projective<P>
Source§type Output = Projective<P>
type Output = Projective<P>
The resulting type after applying the
- operator.Source§fn sub(self, other: &'a mut Projective<P>) -> Projective<P>
fn sub(self, other: &'a mut Projective<P>) -> Projective<P>
Performs the
- operation. Read moreSource§impl<'a, P: DOCurveConfig> Sub<&'a mut Projective<P>> for Projective<P>
impl<'a, P: DOCurveConfig> Sub<&'a mut Projective<P>> for Projective<P>
Source§impl<'b, P: DOCurveConfig> Sub<Projective<P>> for &'b Projective<P>
impl<'b, P: DOCurveConfig> Sub<Projective<P>> for &'b Projective<P>
Source§type Output = Projective<P>
type Output = Projective<P>
The resulting type after applying the
- operator.Source§fn sub(self, other: Projective<P>) -> Projective<P>
fn sub(self, other: Projective<P>) -> Projective<P>
Performs the
- operation. Read moreSource§impl<P: DOCurveConfig> Sub<Projective<P>> for Affine<P>
impl<P: DOCurveConfig> Sub<Projective<P>> for Affine<P>
Source§type Output = Projective<P>
type Output = Projective<P>
The resulting type after applying the
- operator.Source§fn sub(self, other: Projective<P>) -> Projective<P>
fn sub(self, other: Projective<P>) -> Projective<P>
Performs the
- operation. Read moreSource§impl<P: DOCurveConfig, T: Borrow<Affine<P>>> Sub<T> for Projective<P>
impl<P: DOCurveConfig, T: Borrow<Affine<P>>> Sub<T> for Projective<P>
Source§impl<P: DOCurveConfig> Sub for Projective<P>
impl<P: DOCurveConfig> Sub for Projective<P>
Source§impl<'a, P: DOCurveConfig> SubAssign<&'a Projective<P>> for Projective<P>
impl<'a, P: DOCurveConfig> SubAssign<&'a Projective<P>> for Projective<P>
Source§fn sub_assign(&mut self, other: &'a Self)
fn sub_assign(&mut self, other: &'a Self)
Performs the
-= operation. Read moreSource§impl<'a, P: DOCurveConfig> SubAssign<&'a mut Projective<P>> for Projective<P>
impl<'a, P: DOCurveConfig> SubAssign<&'a mut Projective<P>> for Projective<P>
Source§fn sub_assign(&mut self, other: &'a mut Self)
fn sub_assign(&mut self, other: &'a mut Self)
Performs the
-= operation. Read moreSource§impl<P: DOCurveConfig, T: Borrow<Affine<P>>> SubAssign<T> for Projective<P>
impl<P: DOCurveConfig, T: Borrow<Affine<P>>> SubAssign<T> for Projective<P>
Source§fn sub_assign(&mut self, other: T)
fn sub_assign(&mut self, other: T)
Performs the
-= operation. Read moreSource§impl<P: DOCurveConfig> SubAssign for Projective<P>
impl<P: DOCurveConfig> SubAssign for Projective<P>
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-= operation. Read moreSource§impl<'a, P: DOCurveConfig> Sum<&'a Projective<P>> for Projective<P>
impl<'a, P: DOCurveConfig> Sum<&'a Projective<P>> for Projective<P>
Source§impl<P: DOCurveConfig, T: Borrow<Affine<P>>> Sum<T> for Projective<P>
impl<P: DOCurveConfig, T: Borrow<Affine<P>>> Sum<T> for Projective<P>
Source§impl<P: DOCurveConfig> Sum for Projective<P>
impl<P: DOCurveConfig> Sum for Projective<P>
Source§impl<M: DOCurveConfig, ConstraintF: Field> ToConstraintField<ConstraintF> for Projective<M>where
M::BaseField: ToConstraintField<ConstraintF>,
impl<M: DOCurveConfig, ConstraintF: Field> ToConstraintField<ConstraintF> for Projective<M>where
M::BaseField: ToConstraintField<ConstraintF>,
fn to_field_elements(&self) -> Option<Vec<ConstraintF>>
Source§impl<P: DOCurveConfig> Valid for Projective<P>
impl<P: DOCurveConfig> Valid for Projective<P>
Source§fn check(&self) -> Result<(), SerializationError>
fn check(&self) -> Result<(), SerializationError>
Checks whether
self is valid. If self is valid, returns Ok(()). Otherwise, returns
an error describing the failure.
This method is called by deserialize_with_mode if validate is Validate::Yes.Source§fn batch_check<'a>(
batch: impl Iterator<Item = &'a Self> + Send,
) -> Result<(), SerializationError>where
Self: 'a,
fn batch_check<'a>(
batch: impl Iterator<Item = &'a Self> + Send,
) -> Result<(), SerializationError>where
Self: 'a,
Checks whether all items in
batch are valid. If all items are valid, returns Ok(()).
Otherwise, returns an error describing the first failure.Source§const TRIVIAL_CHECK: bool = false
const TRIVIAL_CHECK: bool = false
Whether the
check method is trivial (i.e. always returns Ok(())). If this is true,
the batch_check method will skip all checks and return Ok(()).
This should be set to true for types where check is trivial, e.g.
integers, field elements, etc.
This is false by default.
This is primarily an optimization to skip unnecessary checks in batch_check.Source§impl<P: DOCurveConfig> VariableBaseMSM for Projective<P>
impl<P: DOCurveConfig> VariableBaseMSM for Projective<P>
const ZERO_BUCKET: Self = Self::ZERO
type Bucket = Projective<P>
Source§fn msm(
bases: &[Self::MulBase],
bigints: &[Self::ScalarField],
) -> Result<Self, usize>
fn msm( bases: &[Self::MulBase], bigints: &[Self::ScalarField], ) -> Result<Self, usize>
Performs multi-scalar multiplication. Read more
Source§fn msm_unchecked(bases: &[Self::MulBase], scalars: &[Self::ScalarField]) -> Self
fn msm_unchecked(bases: &[Self::MulBase], scalars: &[Self::ScalarField]) -> Self
Computes an inner product between the
PrimeField elements in scalars
and the corresponding group elements in bases. Read moreSource§fn msm_bigint(
bases: &[Self::MulBase],
bigints: &[<Self::ScalarField as PrimeField>::BigInt],
) -> Self
fn msm_bigint( bases: &[Self::MulBase], bigints: &[<Self::ScalarField as PrimeField>::BigInt], ) -> Self
Optimized implementation of multi-scalar multiplication.
Source§fn msm_u1(bases: &[Self::MulBase], scalars: &[bool]) -> Self
fn msm_u1(bases: &[Self::MulBase], scalars: &[bool]) -> Self
Performs multi-scalar multiplication when the scalars are known to be boolean.
The default implementation is faster than
Self::msm_bigint.Source§fn msm_u8(bases: &[Self::MulBase], scalars: &[u8]) -> Self
fn msm_u8(bases: &[Self::MulBase], scalars: &[u8]) -> Self
Performs multi-scalar multiplication when the scalars are known to be
u8-sized.
The default implementation is faster than Self::msm_bigint.Source§fn msm_u16(bases: &[Self::MulBase], scalars: &[u16]) -> Self
fn msm_u16(bases: &[Self::MulBase], scalars: &[u16]) -> Self
Performs multi-scalar multiplication when the scalars are known to be
u16-sized.
The default implementation is faster than Self::msm_bigint.Source§fn msm_u32(bases: &[Self::MulBase], scalars: &[u32]) -> Self
fn msm_u32(bases: &[Self::MulBase], scalars: &[u32]) -> Self
Performs multi-scalar multiplication when the scalars are known to be
u32-sized.
The default implementation is faster than Self::msm_bigint.Source§impl<P: DOCurveConfig> Zero for Projective<P>
impl<P: DOCurveConfig> Zero for Projective<P>
Source§impl<P: DOCurveConfig> Zeroize for Projective<P>
impl<P: DOCurveConfig> Zeroize for Projective<P>
impl<P: DOCurveConfig> Copy for Projective<P>
impl<P: DOCurveConfig> Eq for Projective<P>
Auto Trait Implementations§
impl<P> Freeze for Projective<P>
impl<P> RefUnwindSafe for Projective<P>
impl<P> Send for Projective<P>
impl<P> Sync for Projective<P>
impl<P> Unpin for Projective<P>
impl<P> UnsafeUnpin for Projective<P>
impl<P> UnwindSafe for Projective<P>
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> CanonicalSerializeHashExt for Twhere
T: CanonicalSerialize,
impl<T> CanonicalSerializeHashExt for Twhere
T: CanonicalSerialize,
fn hash<H>(&self) -> GenericArray<u8, <H as OutputSizeUser>::OutputSize>where
H: Digest,
fn hash_uncompressed<H>(
&self,
) -> GenericArray<u8, <H as OutputSizeUser>::OutputSize>where
H: Digest,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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