pub struct PairwiseAuthShare<V, A, B> { /* private fields */ }Expand description
Generic base for pairwise authenticated shares, analogous to PairwiseAuthKey.
The three type parameters are:
V: value type.B: MAC and local key (Beta) type, an additive Group.A: global key (Alpha) type.
The authenticated shares fulfill this relation:
MAC(x_i)_j = α_ji · x_i + β_ji ∀i∈[1..n] ∀j∈[1..n]∖{i}
where β_ji and α_ji are the (local and global) keys of value x_i held by P_j.
As such, the share of party P_i contains:
x_i, the unauthenticated share value (s.t.x = Σ x_i){MAC(x_i)_j} ∀j∈[1..n]∖{i}, the MACs ofx_ifor each of the other n-1 parties.{β_ij} ∀j∈[1..n]∖{i}and{α_ij} ∀j∈[1..n]∖{i}, the (local and global) keys tied to the values&MACs of the other n-1 parties.
Implementations§
Sourcepub fn try_new(
value: V,
macs: Box<[B]>,
keys: Box<[PairwiseAuthKey<A, B>]>,
) -> Result<Self, PrimitiveError>
pub fn try_new( value: V, macs: Box<[B]>, keys: Box<[PairwiseAuthKey<A, B>]>, ) -> Result<Self, PrimitiveError>
Constructs a new share, returning an error if the MAC and key slices are inconsistent (empty or length-mismatched).
Sourcepub fn get_value_mut(&mut self) -> &mut V
pub fn get_value_mut(&mut self) -> &mut V
Returns a mutable reference to the share value.
Sourcepub fn get_mac(&self, peer_index: PeerIndex) -> Option<&B>
pub fn get_mac(&self, peer_index: PeerIndex) -> Option<&B>
Returns the MAC for the given peer index, or None if out of bounds.
Sourcepub fn get_keys(&self) -> &[PairwiseAuthKey<A, B>]
pub fn get_keys(&self) -> &[PairwiseAuthKey<A, B>]
Returns a slice of all keys (one per distant peer).
Sourcepub fn get_keys_mut(&mut self) -> &mut [PairwiseAuthKey<A, B>]
pub fn get_keys_mut(&mut self) -> &mut [PairwiseAuthKey<A, B>]
Returns a mutable slice of all keys.
Sourcepub fn get_key(&self, peer_index: PeerIndex) -> Option<&PairwiseAuthKey<A, B>>
pub fn get_key(&self, peer_index: PeerIndex) -> Option<&PairwiseAuthKey<A, B>>
Returns the key for the given peer index, or None if out of bounds.
Sourcepub fn into_value(self) -> V
pub fn into_value(self) -> V
Consumes the share, returning the value.
Sourcepub fn into_inner(self) -> (V, Box<[B]>, Box<[PairwiseAuthKey<A, B>]>)
pub fn into_inner(self) -> (V, Box<[B]>, Box<[PairwiseAuthKey<A, B>]>)
Consumes the share, returning all the internal data (value, MACs, and keys).
Sourcepub fn n_distant_parties(&self) -> usize
pub fn n_distant_parties(&self) -> usize
Number of distant parties (excludes the local party).
Sourcepub fn get_alphas(&self) -> impl ExactSizeIterator<Item = GlobalKey<A>> + '_
pub fn get_alphas(&self) -> impl ExactSizeIterator<Item = GlobalKey<A>> + '_
Returns an iterator over the global keys (alpha values) for each distant peer.
Sourcepub fn get_betas(&self) -> impl ExactSizeIterator<Item = &B> + '_
pub fn get_betas(&self) -> impl ExactSizeIterator<Item = &B> + '_
Returns an iterator over the local keys (beta values) for each distant peer.
Sourcepub fn compute_mac(value: V, key: &PairwiseAuthKey<A, B>) -> B
pub fn compute_mac(value: V, key: &PairwiseAuthKey<A, B>) -> B
Compute the MAC of a value x for ( α-global, β-local) keys as:
MAC(x) = α * x + β
Sourcepub fn verify_mac(
key: &PairwiseAuthKey<A, B>,
opening: PairwiseAuthOpenShare<V, B>,
) -> Choice
pub fn verify_mac( key: &PairwiseAuthKey<A, B>, opening: PairwiseAuthOpenShare<V, B>, ) -> Choice
Verify the MAC of a value x for ( α-global, β-local) keys fulfills:
MAC(x) == α * x + β
Sourcepub fn split<M1, M2>(
self,
) -> (BatchedShare<V, A, B, M1>, BatchedShare<V, A, B, M2>)
pub fn split<M1, M2>( self, ) -> (BatchedShare<V, A, B, M1>, BatchedShare<V, A, B, M2>)
Splits a batched share of size M into two smaller batched shares (M1, M2), where M = M1 + M2.
Sourcepub fn split_halves<MDiv2>(
self,
) -> (BatchedShare<V, A, B, MDiv2>, BatchedShare<V, A, B, MDiv2>)
pub fn split_halves<MDiv2>( self, ) -> (BatchedShare<V, A, B, MDiv2>, BatchedShare<V, A, B, MDiv2>)
Splits a batched share of size M into two smaller batched shares (M1, M2), where M = M1 + M2.
Sourcepub fn merge_halves(
this: Self,
other: Self,
) -> BatchedShare<V, A, B, Prod<M, U2>>
pub fn merge_halves( this: Self, other: Self, ) -> BatchedShare<V, A, B, Prod<M, U2>>
Merges two batched shares of sizes M/2 into a larger batched share of size M.
Sourcepub fn split_thirds<MDiv3>(
self,
) -> (BatchedShare<V, A, B, MDiv3>, BatchedShare<V, A, B, MDiv3>, BatchedShare<V, A, B, MDiv3>)
pub fn split_thirds<MDiv3>( self, ) -> (BatchedShare<V, A, B, MDiv3>, BatchedShare<V, A, B, MDiv3>, BatchedShare<V, A, B, MDiv3>)
Splits a batched share of size M into three smaller batched shares (M1, M2, M3), where M = M1 + M2 + M3.
Sourcepub fn merge_thirds(
first: Self,
second: Self,
third: Self,
) -> BatchedShare<V, A, B, Prod<M, U3>>
pub fn merge_thirds( first: Self, second: Self, third: Self, ) -> BatchedShare<V, A, B, Prod<M, U3>>
Merges three batched shares of sizes M/3 into a larger batched share of size M.
Sourcepub fn chunks<CS: Positive>(
&self,
) -> BatchedSharesChunks<<HeapArray<V, M> as IntoIterator>::IntoIter, <HeapArray<B, M> as IntoIterator>::IntoIter, A, <HeapArray<B, M> as IntoIterator>::IntoIter, CS> ⓘwhere
M: PartialDiv<CS>,
pub fn chunks<CS: Positive>(
&self,
) -> BatchedSharesChunks<<HeapArray<V, M> as IntoIterator>::IntoIter, <HeapArray<B, M> as IntoIterator>::IntoIter, A, <HeapArray<B, M> as IntoIterator>::IntoIter, CS> ⓘwhere
M: PartialDiv<CS>,
Creates an iterator that yields fixed-size batched chunks of size CS.
Trait Implementations§
Source§type Output = PairwiseAuthShare<V, A, B>
type Output = PairwiseAuthShare<V, A, B>
+ operator.Source§type Output = PairwiseAuthShare<V, A, B>
type Output = PairwiseAuthShare<V, A, B>
+ operator.Source§type Output = PairwiseAuthShare<V, A, B>
type Output = PairwiseAuthShare<V, A, B>
+ operator.Source§type Output = PairwiseAuthShare<V, A, B>
type Output = PairwiseAuthShare<V, A, B>
+ operator.Source§fn add_assign(&mut self, other: &'a PairwiseAuthShare<V, A, B>)
fn add_assign(&mut self, other: &'a PairwiseAuthShare<V, A, B>)
+= operation. Read moreSource§fn add_assign(&mut self, rhs: PairwiseAuthShare<V, A, B>)
fn add_assign(&mut self, rhs: PairwiseAuthShare<V, A, B>)
+= operation. Read moreSource§fn clone(&self) -> PairwiseAuthShare<V, A, B>
fn clone(&self) -> PairwiseAuthShare<V, A, B>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
Source§fn default() -> PairwiseAuthShare<V, A, B>
fn default() -> PairwiseAuthShare<V, A, B>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§fn from(shares: HeapArray<PairwiseAuthShare<ItemV, A, ItemB>, N>) -> Self
fn from(shares: HeapArray<PairwiseAuthShare<ItemV, A, ItemB>, N>) -> Self
Source§fn from(scalar_shares: ScalarShares<C, M>) -> Self
fn from(scalar_shares: ScalarShares<C, M>) -> Self
Source§fn from(share: PairwiseAuthShare<ItemV, A, ItemB>) -> Self
fn from(share: PairwiseAuthShare<ItemV, A, ItemB>) -> Self
Source§fn from(scalar_share: ScalarShare<C>) -> Self
fn from(scalar_share: ScalarShare<C>) -> Self
Source§fn from_iter<T: IntoIterator<Item = PairwiseAuthShare<ItemV, A, ItemB>>>(
iter: T,
) -> Self
fn from_iter<T: IntoIterator<Item = PairwiseAuthShare<ItemV, A, ItemB>>>( iter: T, ) -> Self
Source§type Item = PairwiseAuthShare<<V as IntoIterator>::Item, A, <B as IntoIterator>::Item>
type Item = PairwiseAuthShare<<V as IntoIterator>::Item, A, <B as IntoIterator>::Item>
Source§type IntoIter = BatchedSharesIterator<<V as IntoIterator>::IntoIter, <B as IntoIterator>::IntoIter, A, <B as IntoIterator>::IntoIter>
type IntoIter = BatchedSharesIterator<<V as IntoIterator>::IntoIter, <B as IntoIterator>::IntoIter, A, <B as IntoIterator>::IntoIter>
Source§type Item = PairwiseAuthShare<<V as IntoIterator>::Item, A, <B as IntoIterator>::Item>
type Item = PairwiseAuthShare<<V as IntoIterator>::Item, A, <B as IntoIterator>::Item>
Source§type IntoIter = BatchedSharesIterator<<V as IntoIterator>::IntoIter, <B as IntoIterator>::IntoIter, A, <B as IntoIterator>::IntoIter>
type IntoIter = BatchedSharesIterator<<V as IntoIterator>::IntoIter, <B as IntoIterator>::IntoIter, A, <B as IntoIterator>::IntoIter>
Source§fn mul_assign(&mut self, other: &'a Const)
fn mul_assign(&mut self, other: &'a Const)
*= operation. Read moreSource§fn eq(&self, other: &PairwiseAuthShare<V, A, B>) -> bool
fn eq(&self, other: &PairwiseAuthShare<V, A, B>) -> bool
self and other values to be equal, and is used by ==.Source§fn add_plaintext(self, ptx: &V, is_first_peer: bool) -> Self
fn add_plaintext(self, ptx: &V, is_first_peer: bool) -> Self
If this is the first peer, adds the plaintext to the value;
otherwise adjusts the first key’s beta: β₀ -= α₀ · ptx.
Source§fn sub_plaintext(self, ptx: &V, is_first_peer: bool) -> Self
fn sub_plaintext(self, ptx: &V, is_first_peer: bool) -> Self
If this is the first peer, subtracts the plaintext from the value;
otherwise adjusts the first key’s beta: β₀ += α₀ · ptx.
Source§fn random_n<Container: FromIterator<Self>>(
rng: impl CryptoRngCore,
n_parties: usize,
) -> Container
fn random_n<Container: FromIterator<Self>>( rng: impl CryptoRngCore, n_parties: usize, ) -> Container
Generate one random authenticated share per peer, with consistent MACs and keys across all peers.
fn random(_rng: impl CryptoRngCore) -> Self
fn random_array<M: Positive>(rng: impl CryptoRngCore) -> HeapArray<Self, M>
Source§fn random_with(
rng: impl CryptoRngCore,
(value, alphas): (V, Vec<GlobalKey<A>>),
) -> Self
fn random_with( rng: impl CryptoRngCore, (value, alphas): (V, Vec<GlobalKey<A>>), ) -> Self
Generate a random authenticated share with a given value whose keys are derived from alphas.
Source§fn random_n_with_each<Container: FromIterator<Self>>(
rng: impl CryptoRngCore,
unauth_shares_and_alphas: impl IntoExactSizeIterator<Item = (V, Vec<GlobalKey<A>>)>,
) -> Container
fn random_n_with_each<Container: FromIterator<Self>>( rng: impl CryptoRngCore, unauth_shares_and_alphas: impl IntoExactSizeIterator<Item = (V, Vec<GlobalKey<A>>)>, ) -> Container
Generate one authenticated share per peer from (value, alphas) pairs, computing MACs consistently across parties.
fn random_n_with<Container: FromIterator<Self>>( rng: impl CryptoRngCore, size: usize, data: D, ) -> Container
Source§fn random_n_with<Container: FromIterator<Self>>(
rng: impl CryptoRngCore,
n_parties: usize,
(secret_value, all_alphas): (V, Vec<Vec<GlobalKey<A>>>),
) -> Container
fn random_n_with<Container: FromIterator<Self>>( rng: impl CryptoRngCore, n_parties: usize, (secret_value, all_alphas): (V, Vec<Vec<GlobalKey<A>>>), ) -> Container
Secret share a value among n parties, each supplied with their own list of global keys.
fn random_with(_rng: impl CryptoRngCore, _: (V, Vec<Vec<GlobalKey<A>>>)) -> Self
fn random_n_with_each<Container: FromIterator<Self>>( rng: impl CryptoRngCore, all_data: impl IntoExactSizeIterator<Item = D>, ) -> Container
Source§fn random_with(rng: impl CryptoRngCore, (n_parties, value): (usize, V)) -> Self
fn random_with(rng: impl CryptoRngCore, (n_parties, value): (usize, V)) -> Self
Generate a random authenticated share with a given value and random MACs and keys.
fn random_n_with<Container: FromIterator<Self>>( rng: impl CryptoRngCore, size: usize, data: D, ) -> Container
fn random_n_with_each<Container: FromIterator<Self>>( rng: impl CryptoRngCore, all_data: impl IntoExactSizeIterator<Item = D>, ) -> Container
Source§fn random_n_with<Container: FromIterator<Self>>(
rng: impl CryptoRngCore,
n_parties: usize,
value: V,
) -> Container
fn random_n_with<Container: FromIterator<Self>>( rng: impl CryptoRngCore, n_parties: usize, value: V, ) -> Container
Secret share a value among n parties, generating an authenticated share for each peer with consistent MACs and keys across all peers.
Source§fn random_n_with_each<Container: FromIterator<Self>>(
rng: impl CryptoRngCore,
unauth_shares: impl IntoExactSizeIterator<Item = V>,
) -> Container
fn random_n_with_each<Container: FromIterator<Self>>( rng: impl CryptoRngCore, unauth_shares: impl IntoExactSizeIterator<Item = V>, ) -> Container
Generate an authenticated share for each peer given its additive share value, with consistent MACs and keys across all peers.
fn random_with(_rng: impl CryptoRngCore, _data: V) -> Self
Source§fn random_with(rng: impl CryptoRngCore, alphas: Vec<GlobalKey<A>>) -> Self
fn random_with(rng: impl CryptoRngCore, alphas: Vec<GlobalKey<A>>) -> Self
Generate a random authenticated share whose keys are derived from the given global keys.
Source§fn random_n_with_each<Container: FromIterator<Self>>(
rng: impl CryptoRngCore,
all_alphas: impl IntoExactSizeIterator<Item = Vec<GlobalKey<A>>>,
) -> Container
fn random_n_with_each<Container: FromIterator<Self>>( rng: impl CryptoRngCore, all_alphas: impl IntoExactSizeIterator<Item = Vec<GlobalKey<A>>>, ) -> Container
Generate one authenticated share per peer, deriving each party’s keys from their global keys.
fn random_n_with<Container: FromIterator<Self>>( rng: impl CryptoRngCore, size: usize, data: D, ) -> Container
Source§fn random_with(rng: impl CryptoRngCore, n_parties: usize) -> Self
fn random_with(rng: impl CryptoRngCore, n_parties: usize) -> Self
Generate a random authenticated share with random MACs and keys for all other parties.
fn random_n_with<Container: FromIterator<Self>>( rng: impl CryptoRngCore, size: usize, data: D, ) -> Container
fn random_n_with_each<Container: FromIterator<Self>>( rng: impl CryptoRngCore, all_data: impl IntoExactSizeIterator<Item = D>, ) -> Container
Source§fn open_to(
&self,
peer: PeerIndex,
) -> Result<PairwiseAuthOpenShare<V, B>, PrimitiveError>
fn open_to( &self, peer: PeerIndex, ) -> Result<PairwiseAuthOpenShare<V, B>, PrimitiveError>
Open the share towards another peer.
Source§fn open_to_all_others(
&self,
) -> impl ExactSizeIterator<Item = PairwiseAuthOpenShare<V, B>>
fn open_to_all_others( &self, ) -> impl ExactSizeIterator<Item = PairwiseAuthOpenShare<V, B>>
Open the share towards all other peers.
Source§fn reconstruct(
&self,
openings: Vec<PairwiseAuthOpenShare<V, B>>,
) -> Result<V, PrimitiveError>
fn reconstruct( &self, openings: Vec<PairwiseAuthOpenShare<V, B>>, ) -> Result<V, PrimitiveError>
Reconstruct a secret from openings coming from all other parties.
Source§type Opening = PairwiseAuthOpenShare<V, B>
type Opening = PairwiseAuthOpenShare<V, B>
Source§fn reconstruct_all<T: Borrow<Self>>(
shares: Vec<T>,
) -> Result<Self::Value, PrimitiveError>
fn reconstruct_all<T: Borrow<Self>>( shares: Vec<T>, ) -> Result<Self::Value, PrimitiveError>
n secrets from the openings and
checking that they are all equal.type Dst = PairwiseAuthShare<V, A, B>
Source§fn read(
reader: &mut impl Reader<'de>,
dst: &mut MaybeUninit<Self>,
) -> ReadResult<()>
fn read( reader: &mut impl Reader<'de>, dst: &mut MaybeUninit<Self>, ) -> ReadResult<()>
const TYPE_META: TypeMeta = TypeMeta::Dynamic
Source§type Output = PairwiseAuthShare<V, A, B>
type Output = PairwiseAuthShare<V, A, B>
- operator.Source§type Output = PairwiseAuthShare<V, A, B>
type Output = PairwiseAuthShare<V, A, B>
- operator.Source§type Output = PairwiseAuthShare<V, A, B>
type Output = PairwiseAuthShare<V, A, B>
- operator.Source§type Output = PairwiseAuthShare<V, A, B>
type Output = PairwiseAuthShare<V, A, B>
- operator.Source§fn sub_assign(&mut self, other: &'a PairwiseAuthShare<V, A, B>)
fn sub_assign(&mut self, other: &'a PairwiseAuthShare<V, A, B>)
-= operation. Read moreSource§fn sub_assign(&mut self, rhs: PairwiseAuthShare<V, A, B>)
fn sub_assign(&mut self, rhs: PairwiseAuthShare<V, A, B>)
-= operation. Read moreSource§fn sum<I: Iterator<Item = &'a PairwiseAuthShare<V, A, B>>>(iter: I) -> Self
fn sum<I: Iterator<Item = &'a PairwiseAuthShare<V, A, B>>>(iter: I) -> Self
Self from the elements by “summing up”
the items.Source§fn verify_from_peer_with(
&self,
open_share: PairwiseAuthOpenShare<V, B>,
peer: PeerIndex,
_verification_data: (),
) -> Result<(), PrimitiveError>
fn verify_from_peer_with( &self, open_share: PairwiseAuthOpenShare<V, B>, peer: PeerIndex, _verification_data: (), ) -> Result<(), PrimitiveError>
Check the MACs of the share received from another peer.
Source§fn verify_with(
&self,
open_shares: Vec<PairwiseAuthOpenShare<V, B>>,
_verification_data: (),
) -> Result<(), PrimitiveError>
fn verify_with( &self, open_shares: Vec<PairwiseAuthOpenShare<V, B>>, _verification_data: (), ) -> Result<(), PrimitiveError>
Check the MACs of each share received from all other peers.
Source§type VerificationData = ()
type VerificationData = ()
Source§fn verify_all_with(
shares: Vec<Self>,
verification_data: Self::VerificationData,
) -> Result<(), PrimitiveError>
fn verify_all_with( shares: Vec<Self>, verification_data: Self::VerificationData, ) -> Result<(), PrimitiveError>
Auto Trait Implementations§
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'de, T> Deserialize<'de> for Twhere
T: SchemaRead<'de>,
impl<'de, T> Deserialize<'de> for Twhere
T: SchemaRead<'de>,
Source§impl<T> DeserializeOwned for Twhere
T: SchemaReadOwned,
impl<T> DeserializeOwned for Twhere
T: SchemaReadOwned,
Source§fn deserialize_from<'de>(
src: &mut impl Reader<'de>,
) -> Result<Self::Dst, ReadError>
fn deserialize_from<'de>( src: &mut impl Reader<'de>, ) -> Result<Self::Dst, ReadError>
Reader into a new Self::Dst.Source§fn deserialize_from_into<'de>(
src: &mut impl Reader<'de>,
dst: &mut MaybeUninit<Self::Dst>,
) -> Result<(), ReadError>
fn deserialize_from_into<'de>( src: &mut impl Reader<'de>, dst: &mut MaybeUninit<Self::Dst>, ) -> Result<(), ReadError>
Reader into dst.Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Serialize for Twhere
T: SchemaWrite + ?Sized,
impl<T> Serialize for Twhere
T: SchemaWrite + ?Sized,
Source§fn serialize(src: &Self::Src) -> Result<Vec<u8>, WriteError>
fn serialize(src: &Self::Src) -> Result<Vec<u8>, WriteError>
Vec of bytes.Source§fn serialize_into(
dst: &mut impl Writer,
src: &Self::Src,
) -> Result<(), WriteError>
fn serialize_into( dst: &mut impl Writer, src: &Self::Src, ) -> Result<(), WriteError>
Source§fn serialized_size(src: &Self::Src) -> Result<u64, WriteError>
fn serialized_size(src: &Self::Src) -> Result<u64, WriteError>
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.