pub struct Halo2IRBuilder {
pub nodes: Vec<Halo2GraphNode>,
pub node_meta: Vec<NodeMeta>,
pub input_values: Vec<Fr>,
/* private fields */
}Expand description
Backend that records the circuit-population trace as a graph IR.
Fields§
§nodes: Vec<Halo2GraphNode>Nodes, in tape-emission order.
node_meta: Vec<NodeMeta>Replay metadata per node, indexed by NodeId.
input_values: Vec<Fr>Proof-input witnesses, one per LoadWitness node, in emission order.
Implementations§
Source§impl Halo2IRBuilder
impl Halo2IRBuilder
pub fn new(lookup_bits: usize) -> Self
Sourcepub fn total_ctx_len(&self) -> usize
pub fn total_ctx_len(&self) -> usize
Total number of context-tape (advice) cells written by all nodes.
Sourcepub fn total_lookups_len(&self) -> usize
pub fn total_lookups_len(&self) -> usize
Total number of range-tape (lookup) cells written by all nodes.
Sourcepub fn lookup_bits(&self) -> usize
pub fn lookup_bits(&self) -> usize
Range-check lookup bits the IR was built for.
Trait Implementations§
Source§impl BabyBearExt4Inst for Halo2IRBuilder
impl BabyBearExt4Inst for Halo2IRBuilder
fn ext_load_constant( &mut self, value: BabyBearExt4, ) -> BabyBearExt4Wire<GraphCell>
fn ext_load_reduced_constant( &mut self, value: BabyBearExt4, ) -> ReducedBabyBearExt4Wire<GraphCell>
fn ext_add( &mut self, a: BabyBearExt4Wire<GraphCell>, b: BabyBearExt4Wire<GraphCell>, ) -> BabyBearExt4Wire<GraphCell>
fn ext_neg( &mut self, a: BabyBearExt4Wire<GraphCell>, ) -> BabyBearExt4Wire<GraphCell>
fn ext_sub( &mut self, a: BabyBearExt4Wire<GraphCell>, b: BabyBearExt4Wire<GraphCell>, ) -> BabyBearExt4Wire<GraphCell>
fn ext_scalar_mul( &mut self, a: BabyBearExt4Wire<GraphCell>, b: BabyBearWire<GraphCell>, ) -> BabyBearExt4Wire<GraphCell>
Source§fn ext_scalar_mul_add(
&mut self,
a: BabyBearExt4Wire<GraphCell>,
b: BabyBearWire<GraphCell>,
c: BabyBearExt4Wire<GraphCell>,
) -> BabyBearExt4Wire<GraphCell>
fn ext_scalar_mul_add( &mut self, a: BabyBearExt4Wire<GraphCell>, b: BabyBearWire<GraphCell>, c: BabyBearExt4Wire<GraphCell>, ) -> BabyBearExt4Wire<GraphCell>
a * b + c where b is a base-field scalar.fn ext_assert_zero(&mut self, a: BabyBearExt4Wire<GraphCell>)
fn ext_assert_equal( &mut self, a: BabyBearExt4Wire<GraphCell>, b: BabyBearExt4Wire<GraphCell>, )
fn ext_mul( &mut self, a: BabyBearExt4Wire<GraphCell>, b: BabyBearExt4Wire<GraphCell>, ) -> BabyBearExt4Wire<GraphCell>
fn ext_div( &mut self, a: BabyBearExt4Wire<GraphCell>, b: BabyBearExt4Wire<GraphCell>, ) -> BabyBearExt4Wire<GraphCell>
fn ext_reduce_max_bits( &mut self, a: BabyBearExt4Wire<GraphCell>, ) -> BabyBearExt4Wire<GraphCell>
fn ext_zero(&mut self) -> BabyBearExt4Wire<GraphCell>
fn ext_from_base_const( &mut self, value: BabyBear, ) -> BabyBearExt4Wire<GraphCell>
fn ext_from_base_var( &mut self, value: BabyBearWire<GraphCell>, ) -> BabyBearExt4Wire<GraphCell>
fn ext_mul_base_const( &mut self, a: BabyBearExt4Wire<GraphCell>, c: BabyBear, ) -> BabyBearExt4Wire<GraphCell>
fn ext_square( &mut self, a: BabyBearExt4Wire<GraphCell>, ) -> BabyBearExt4Wire<GraphCell>
Source§fn ext_pow_power_of_two(
&mut self,
a: BabyBearExt4Wire<GraphCell>,
n: usize,
) -> BabyBearExt4Wire<GraphCell>
fn ext_pow_power_of_two( &mut self, a: BabyBearExt4Wire<GraphCell>, n: usize, ) -> BabyBearExt4Wire<GraphCell>
a^(2^n)Source§impl BabyBearInst for Halo2IRBuilder
impl BabyBearInst for Halo2IRBuilder
Source§fn bb_load_constant(&mut self, value: BabyBear) -> BabyBearWire<GraphCell>
fn bb_load_constant(&mut self, value: BabyBear) -> BabyBearWire<GraphCell>
Mirrors BabyBearChip::load_constant (const cache + load_zero for zero).
fn bb_load_reduced_constant( &mut self, value: BabyBear, ) -> ReducedBabyBearWire<GraphCell>
fn bb_reduce(&mut self, a: BabyBearWire<GraphCell>) -> BabyBearWire<GraphCell>
fn bb_reduce_max_bits( &mut self, a: BabyBearWire<GraphCell>, ) -> BabyBearWire<GraphCell>
fn bb_add( &mut self, a: BabyBearWire<GraphCell>, b: BabyBearWire<GraphCell>, ) -> BabyBearWire<GraphCell>
fn bb_neg(&mut self, a: BabyBearWire<GraphCell>) -> BabyBearWire<GraphCell>
fn bb_sub( &mut self, a: BabyBearWire<GraphCell>, b: BabyBearWire<GraphCell>, ) -> BabyBearWire<GraphCell>
fn bb_mul( &mut self, a: BabyBearWire<GraphCell>, b: BabyBearWire<GraphCell>, ) -> BabyBearWire<GraphCell>
Source§fn bb_mul_add(
&mut self,
a: BabyBearWire<GraphCell>,
b: BabyBearWire<GraphCell>,
c: BabyBearWire<GraphCell>,
) -> BabyBearWire<GraphCell>
fn bb_mul_add( &mut self, a: BabyBearWire<GraphCell>, b: BabyBearWire<GraphCell>, c: BabyBearWire<GraphCell>, ) -> BabyBearWire<GraphCell>
a * b + cfn bb_div( &mut self, a: BabyBearWire<GraphCell>, b: BabyBearWire<GraphCell>, ) -> BabyBearWire<GraphCell>
fn bb_assert_zero(&mut self, a: BabyBearWire<GraphCell>)
fn bb_assert_equal( &mut self, a: BabyBearWire<GraphCell>, b: BabyBearWire<GraphCell>, )
fn bb_zero(&mut self) -> BabyBearWire<GraphCell>
fn bb_one(&mut self) -> BabyBearWire<GraphCell>
fn bb_mul_const( &mut self, a: BabyBearWire<GraphCell>, c: BabyBear, ) -> BabyBearWire<GraphCell>
fn bb_square(&mut self, a: BabyBearWire<GraphCell>) -> BabyBearWire<GraphCell>
Source§fn bb_pow_power_of_two(
&mut self,
a: BabyBearWire<GraphCell>,
n: usize,
) -> BabyBearWire<GraphCell>
fn bb_pow_power_of_two( &mut self, a: BabyBearWire<GraphCell>, n: usize, ) -> BabyBearWire<GraphCell>
a^(2^n)Source§impl ChipBase for Halo2IRBuilder
impl ChipBase for Halo2IRBuilder
Source§impl GateInst for Halo2IRBuilder
impl GateInst for Halo2IRBuilder
Source§fn load_constant(&mut self, value: Fr) -> GraphCell
fn load_constant(&mut self, value: Fr) -> GraphCell
Mirrors ctx.load_constant: always assigns a fresh cell (no cache).
Source§fn constrain_equal(&mut self, _a: GraphCell, _b: GraphCell)
fn constrain_equal(&mut self, _a: GraphCell, _b: GraphCell)
Copy constraint only; assigns no advice cells, so no node is emitted.
Source§fn select(
&mut self,
when_true: GraphCell,
when_false: GraphCell,
cond: GraphCell,
) -> GraphCell
fn select( &mut self, when_true: GraphCell, when_false: GraphCell, cond: GraphCell, ) -> GraphCell
if cond { when_true } else { when_false }; cond must already be boolean-constrained.Source§fn select_const(
&mut self,
when_true: Fr,
when_false: Fr,
cond: GraphCell,
) -> GraphCell
fn select_const( &mut self, when_true: Fr, when_false: Fr, cond: GraphCell, ) -> GraphCell
Self::select with constant branch values.Source§fn num_to_bits(&mut self, a: GraphCell, range_bits: usize) -> Vec<GraphCell>
fn num_to_bits(&mut self, a: GraphCell, range_bits: usize) -> Vec<GraphCell>
Little-endian bit decomposition, constrained to
range_bits bits.Source§fn inner_product_const(
&mut self,
values: &[GraphCell],
coeffs: &[Fr],
) -> GraphCell
fn inner_product_const( &mut self, values: &[GraphCell], coeffs: &[Fr], ) -> GraphCell
Inner product of
values with constant coefficients.Source§fn cell_count(&self) -> usize
fn cell_count(&self) -> usize
Number of cells assigned so far (for cell profiling).
Source§impl PopulateInputs for Halo2IRBuilder
impl PopulateInputs for Halo2IRBuilder
fn load_witness(&mut self, value: Fr) -> GraphCell
fn bb_load_reduced_witness( &mut self, value: BabyBear, ) -> ReducedBabyBearWire<GraphCell>
fn ext_load_reduced_witness( &mut self, value: BabyBearExt4, ) -> ReducedBabyBearExt4Wire<GraphCell>
Source§impl Poseidon2Inst for Halo2IRBuilder
impl Poseidon2Inst for Halo2IRBuilder
Source§fn hash_babybear_slice_to_digest(
&mut self,
values: &[ReducedBabyBearWire<GraphCell>],
) -> GraphCell
fn hash_babybear_slice_to_digest( &mut self, values: &[ReducedBabyBearWire<GraphCell>], ) -> GraphCell
Mirrors hash::poseidon2::hash_babybear_slice_to_digest.
Source§impl TranscriptInst for Halo2IRBuilder
impl TranscriptInst for Halo2IRBuilder
Source§fn init_transcript(&mut self)
fn init_transcript(&mut self)
(Re)initialize the transcript sponge to the all-zero state.
fn observe(&mut self, value: &ReducedBabyBearWire<GraphCell>)
fn observe_ext(&mut self, value: &ReducedBabyBearExt4Wire<GraphCell>)
fn observe_commit(&mut self, digest: &DigestWire<GraphCell>)
fn sample(&mut self) -> BabyBearWire<GraphCell>
fn sample_ext(&mut self) -> BabyBearExt4Wire<GraphCell>
Source§fn sample_bits(&mut self, bits: usize) -> GraphCell
fn sample_bits(&mut self, bits: usize) -> GraphCell
Sample and truncate to
bits bits; returns a raw cell in [0, 2^bits).Source§fn check_witness(
&mut self,
bits: usize,
witness: &ReducedBabyBearWire<GraphCell>,
)
fn check_witness( &mut self, bits: usize, witness: &ReducedBabyBearWire<GraphCell>, )
Asserts that the proof-of-work
witness passes with bits leading zero bits.Source§fn transcript_load_reduced_constant(
&mut self,
value: BabyBear,
) -> ReducedBabyBearWire<Self::F>
fn transcript_load_reduced_constant( &mut self, value: BabyBear, ) -> ReducedBabyBearWire<Self::F>
Load a reduced constant through
TranscriptChip’s baby-bear constant
cache, which is distinct from BabyBearChip::const_cache. This split
is preserved to keep the verifying key unchanged.Auto Trait Implementations§
impl Freeze for Halo2IRBuilder
impl RefUnwindSafe for Halo2IRBuilder
impl Send for Halo2IRBuilder
impl Sync for Halo2IRBuilder
impl Unpin for Halo2IRBuilder
impl UnwindSafe for Halo2IRBuilder
Blanket Implementations§
§impl<T> AlignerFor<1> for T
impl<T> AlignerFor<1> for T
§impl<T> AlignerFor<1024> for T
impl<T> AlignerFor<1024> for T
§impl<T> AlignerFor<128> for T
impl<T> AlignerFor<128> for T
§impl<T> AlignerFor<16> for T
impl<T> AlignerFor<16> for T
§impl<T> AlignerFor<16384> for T
impl<T> AlignerFor<16384> for T
§impl<T> AlignerFor<2> for T
impl<T> AlignerFor<2> for T
§impl<T> AlignerFor<2048> for T
impl<T> AlignerFor<2048> for T
§impl<T> AlignerFor<256> for T
impl<T> AlignerFor<256> for T
§impl<T> AlignerFor<32> for T
impl<T> AlignerFor<32> for T
§impl<T> AlignerFor<32768> for T
impl<T> AlignerFor<32768> for T
§impl<T> AlignerFor<4> for T
impl<T> AlignerFor<4> for T
§impl<T> AlignerFor<4096> for T
impl<T> AlignerFor<4096> for T
§impl<T> AlignerFor<512> for T
impl<T> AlignerFor<512> for T
§impl<T> AlignerFor<64> for T
impl<T> AlignerFor<64> for T
§impl<T> AlignerFor<8> for T
impl<T> AlignerFor<8> for T
§impl<T> AlignerFor<8192> for T
impl<T> AlignerFor<8192> for T
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
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
Formats each item in a sequence. Read more
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§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>
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§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
§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,
Borrows
self and passes that borrow into the pipe function. Read more§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,
Mutably borrows
self and passes that borrow into the pipe function. Read more§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
§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
§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
Borrows
self, then passes self.as_ref() into the pipe function.§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
Mutably borrows
self, then passes self.as_mut() into the pipe
function.§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
Borrows
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<S> ROExtAcc for S
impl<S> ROExtAcc for S
§fn f_get<F>(&self, offset: FieldOffset<S, F, Aligned>) -> &F
fn f_get<F>(&self, offset: FieldOffset<S, F, Aligned>) -> &F
Gets a reference to a field, determined by
offset. Read more§fn f_get_mut<F>(&mut self, offset: FieldOffset<S, F, Aligned>) -> &mut F
fn f_get_mut<F>(&mut self, offset: FieldOffset<S, F, Aligned>) -> &mut F
Gets a muatble reference to a field, determined by
offset. Read more§fn f_get_ptr<F, A>(&self, offset: FieldOffset<S, F, A>) -> *const F
fn f_get_ptr<F, A>(&self, offset: FieldOffset<S, F, A>) -> *const F
Gets a const pointer to a field,
the field is determined by
offset. Read more§fn f_get_mut_ptr<F, A>(&mut self, offset: FieldOffset<S, F, A>) -> *mut F
fn f_get_mut_ptr<F, A>(&mut self, offset: FieldOffset<S, F, A>) -> *mut F
Gets a mutable pointer to a field, determined by
offset. Read more§impl<S> ROExtOps<Aligned> for S
impl<S> ROExtOps<Aligned> for S
§fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Aligned>, value: F) -> F
fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Aligned>, value: F) -> F
Replaces a field (determined by
offset) with value,
returning the previous value of the field. Read more§fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Aligned>) -> Fwhere
F: Copy,
fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Aligned>) -> Fwhere
F: Copy,
§impl<S> ROExtOps<Unaligned> for S
impl<S> ROExtOps<Unaligned> for S
§fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, value: F) -> F
fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, value: F) -> F
Replaces a field (determined by
offset) with value,
returning the previous value of the field. Read more§fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Unaligned>) -> Fwhere
F: Copy,
fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Unaligned>) -> Fwhere
F: Copy,
§impl<F, Fp, Pt, FC> Selectable<F, Reduced<Pt, Fp>> for FCwhere
F: BigPrimeField,
Pt: Clone,
FC: Selectable<F, Pt>,
impl<F, Fp, Pt, FC> Selectable<F, Reduced<Pt, Fp>> for FCwhere
F: BigPrimeField,
Pt: Clone,
FC: Selectable<F, Pt>,
fn select( &self, ctx: &mut Context<F>, a: Reduced<Pt, Fp>, b: Reduced<Pt, Fp>, sel: AssignedValue<F>, ) -> Reduced<Pt, Fp>
fn select_by_indicator( &self, ctx: &mut Context<F>, a: &impl AsRef<[Reduced<Pt, Fp>]>, coeffs: &[AssignedValue<F>], ) -> Reduced<Pt, Fp>
§impl<T> SelfOps for Twhere
T: ?Sized,
impl<T> SelfOps for Twhere
T: ?Sized,
§fn piped<F, U>(self, f: F) -> U
fn piped<F, U>(self, f: F) -> U
Emulates the pipeline operator, allowing method syntax in more places. Read more
§fn piped_ref<'a, F, U>(&'a self, f: F) -> Uwhere
F: FnOnce(&'a Self) -> U,
fn piped_ref<'a, F, U>(&'a self, f: F) -> Uwhere
F: FnOnce(&'a Self) -> U,
The same as
piped except that the function takes &Self
Useful for functions that take &Self instead of Self. Read more§fn piped_mut<'a, F, U>(&'a mut self, f: F) -> Uwhere
F: FnOnce(&'a mut Self) -> U,
fn piped_mut<'a, F, U>(&'a mut self, f: F) -> Uwhere
F: FnOnce(&'a mut Self) -> U,
The same as
piped, except that the function takes &mut Self.
Useful for functions that take &mut Self instead of Self.§fn mutated<F>(self, f: F) -> Self
fn mutated<F>(self, f: F) -> Self
Mutates self using a closure taking self by mutable reference,
passing it along the method chain. Read more
§fn observe<F>(self, f: F) -> Self
fn observe<F>(self, f: F) -> Self
Observes the value of self, passing it along unmodified.
Useful in long method chains. Read more
§fn as_ref_<T>(&self) -> &T
fn as_ref_<T>(&self) -> &T
Performs a reference to reference conversion with
AsRef,
using the turbofish .as_ref_::<_>() syntax. Read more§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow() only in debug builds, and is erased in release
builds.§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
Calls
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref() only in debug builds, and is erased in release
builds.§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
Calls
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref() only in debug builds, and is erased in release
builds.§impl<This> TransmuteElement for Thiswhere
This: ?Sized,
impl<This> TransmuteElement for Thiswhere
This: ?Sized,
§unsafe fn transmute_element<T>(self) -> Self::TransmutedPtrwhere
Self: CanTransmuteElement<T>,
unsafe fn transmute_element<T>(self) -> Self::TransmutedPtrwhere
Self: CanTransmuteElement<T>,
Transmutes the element type of this pointer.. Read more
§impl<T> TryConv for T
impl<T> TryConv for T
§impl<T> TypeIdentity for Twhere
T: ?Sized,
impl<T> TypeIdentity for Twhere
T: ?Sized,
§fn as_type_mut(&mut self) -> &mut Self::Type
fn as_type_mut(&mut self) -> &mut Self::Type
Converts a mutable reference back to the original type.
§fn into_type_box(self: Box<Self>) -> Box<Self::Type>
fn into_type_box(self: Box<Self>) -> Box<Self::Type>
Converts a box back to the original type.
§fn into_type_arc(this: Arc<Self>) -> Arc<Self::Type>
fn into_type_arc(this: Arc<Self>) -> Arc<Self::Type>
Converts an Arc back to the original type. Read more
§fn into_type_rc(this: Rc<Self>) -> Rc<Self::Type>
fn into_type_rc(this: Rc<Self>) -> Rc<Self::Type>
Converts an Rc back to the original type. Read more
§fn from_type_ref(this: &Self::Type) -> &Self
fn from_type_ref(this: &Self::Type) -> &Self
Converts a reference back to the original type.
§fn from_type_mut(this: &mut Self::Type) -> &mut Self
fn from_type_mut(this: &mut Self::Type) -> &mut Self
Converts a mutable reference back to the original type.
§fn from_type_box(this: Box<Self::Type>) -> Box<Self>
fn from_type_box(this: Box<Self::Type>) -> Box<Self>
Converts a box back to the original type.
§fn from_type_arc(this: Arc<Self::Type>) -> Arc<Self>
fn from_type_arc(this: Arc<Self::Type>) -> Arc<Self>
Converts an Arc back to the original type.
§fn from_type_rc(this: Rc<Self::Type>) -> Rc<Self>
fn from_type_rc(this: Rc<Self::Type>) -> Rc<Self>
Converts an Rc back to the original type.