pub struct AggregatorServer {
pub aggregator: Aggregator,
background_tasks: BackgroundTaskManager,
}
Expand description
Aggregator server wrapper that manages background tasks.
Fields§
§aggregator: Aggregator
§background_tasks: BackgroundTaskManager
Implementations§
Source§impl AggregatorServer
impl AggregatorServer
pub async fn new(config: BridgeConfig) -> Result<Self, BridgeError>
Sourcepub async fn start_background_tasks(&self) -> Result<(), BridgeError>
pub async fn start_background_tasks(&self) -> Result<(), BridgeError>
Starts the background tasks for the aggregator. If called multiple times, it will restart only the tasks that are not already running.
pub async fn shutdown(&mut self)
Methods from Deref<Target = Aggregator>§
pub fn get_verifier_clients(&self) -> &[ClementineVerifierClient<Channel>]
Sourceasync fn fetch_pubkeys_from_entities<T, C, F, Fut>(
&self,
clients: &[C],
keys_storage: &RwLock<Vec<Option<T>>>,
pubkey_fetcher: F,
key_type_name: &str,
) -> Result<Vec<T>, BridgeError>
async fn fetch_pubkeys_from_entities<T, C, F, Fut>( &self, clients: &[C], keys_storage: &RwLock<Vec<Option<T>>>, pubkey_fetcher: F, key_type_name: &str, ) -> Result<Vec<T>, BridgeError>
Generic helper function to fetch keys from clients
Sourcepub async fn fetch_verifier_keys(&self) -> Result<Vec<PublicKey>, BridgeError>
pub async fn fetch_verifier_keys(&self) -> Result<Vec<PublicKey>, BridgeError>
If all verifier keys are already collected, returns them. Otherwise, it tries to collect them from the verifiers, saves them and returns them.
Sourcepub async fn fetch_operator_keys(
&self,
) -> Result<Vec<XOnlyPublicKey>, BridgeError>
pub async fn fetch_operator_keys( &self, ) -> Result<Vec<XOnlyPublicKey>, BridgeError>
If all operator keys are already collected, returns them. Otherwise, it tries to collect them from the operators, saves them and returns them.
pub fn get_operator_clients(&self) -> &[ClementineOperatorClient<Channel>]
Sourcepub async fn collect_and_distribute_keys(
&self,
deposit_params: &DepositParams,
) -> Result<(), BridgeError>
pub async fn collect_and_distribute_keys( &self, deposit_params: &DepositParams, ) -> Result<(), BridgeError>
Collects and distributes keys to verifiers from operators and watchtowers for the new deposit for operators: get bitvm assert winternitz public keys and watchtower challenge ack hashes for watchtowers: get winternitz public keys for watchtower challenges
async fn _aggregate_move_partial_sigs( &self, deposit_data: &mut DepositData, agg_nonce: &AggregatedNonce, partial_sigs: Vec<PartialSignature>, ) -> Result<Signature, BridgeError>
Sourcepub async fn get_participating_verifiers(
&self,
deposit_data: &DepositData,
) -> Result<ParticipatingVerifiers, BridgeError>
pub async fn get_participating_verifiers( &self, deposit_data: &DepositData, ) -> Result<ParticipatingVerifiers, BridgeError>
Returns a list of verifier clients that are participating in the deposit.
Sourcepub async fn get_participating_operators(
&self,
deposit_data: &DepositData,
) -> Result<ParticipatingOperators, BridgeError>
pub async fn get_participating_operators( &self, deposit_data: &DepositData, ) -> Result<ParticipatingOperators, BridgeError>
Returns a list of operator clients that are participating in the deposit.
Sourcepub async fn get_entity_statuses(
&self,
restart_tasks: bool,
) -> Result<Vec<EntityStatusWithId>, BridgeError>
pub async fn get_entity_statuses( &self, restart_tasks: bool, ) -> Result<Vec<EntityStatusWithId>, BridgeError>
Retrieves the status of all entities (operators and verifiers) and restarts background tasks if needed. Returns a vector of EntityStatusWithId. Only returns an error if restarting tasks fails when requested.
async fn create_movetx( &self, partial_sigs: Vec<Vec<u8>>, movetx_agg_nonce: AggregatedNonce, deposit_params: DepositParams, ) -> Result<TxHandler<Signed>, Status>
async fn verify_and_save_emergency_stop_sigs( &self, emergency_stop_sigs: Vec<Vec<u8>>, emergency_stop_agg_nonce: AggregatedNonce, deposit_params: DepositParams, ) -> Result<(), BridgeError>
pub async fn send_emergency_stop_tx( &self, tx: Transaction, ) -> Result<Transaction, Status>
Trait Implementations§
Source§impl ClementineAggregator for AggregatorServer
impl ClementineAggregator for AggregatorServer
Source§fn new_deposit<'life0, 'async_trait>(
&'life0 self,
request: Request<Deposit>,
) -> Pin<Box<dyn Future<Output = Result<Response<RawSignedTx>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn new_deposit<'life0, 'async_trait>(
&'life0 self,
request: Request<Deposit>,
) -> Pin<Box<dyn Future<Output = Result<Response<RawSignedTx>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handles a new deposit request from a user. This function coordinates the signing process between verifiers to create a valid move transaction. It ensures a covenant using pre-signed NofN transactions. It also collects signatures from operators to ensure that the operators can be slashed if they act maliciously.
Overview:
- Receive and parse deposit parameters from user
- Signs all NofN transactions with verifiers using MuSig2:
- Creates nonce streams with verifiers (get pub nonces for each transaction)
- Opens deposit signing streams with verifiers (sends aggnonces for each transaction, receives partial sigs)
- Opens deposit finalization streams with verifiers (sends final signatures, receives movetx signatures)
- Collects signatures from operators
- Waits for all tasks to complete
- Returns signed move transaction
The following pipelines are used to coordinate the signing process, these move the data between the verifiers and the aggregator:
- Nonce aggregation
- Nonce distribution
- Signature aggregation
- Signature distribution
fn vergen<'life0, 'async_trait>(
&'life0 self,
_request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<VergenResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn get_entity_statuses<'life0, 'async_trait>(
&'life0 self,
request: Request<GetEntityStatusesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<EntityStatuses>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_entity_statuses<'life0, 'async_trait>(
&'life0 self,
request: Request<GetEntityStatusesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<EntityStatuses>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn optimistic_payout<'life0, 'async_trait>(
&'life0 self,
request: Request<OptimisticWithdrawParams>,
) -> Pin<Box<dyn Future<Output = Result<Response<RawSignedTx>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn optimistic_payout<'life0, 'async_trait>(
&'life0 self,
request: Request<OptimisticWithdrawParams>,
) -> Pin<Box<dyn Future<Output = Result<Response<RawSignedTx>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn internal_send_tx<'life0, 'async_trait>(
&'life0 self,
request: Request<SendTxRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn internal_send_tx<'life0, 'async_trait>(
&'life0 self,
request: Request<SendTxRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn setup<'life0, 'async_trait>(
&'life0 self,
_request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<VerifierPublicKeys>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn setup<'life0, 'async_trait>(
&'life0 self,
_request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<VerifierPublicKeys>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn withdraw<'life0, 'async_trait>(
&'life0 self,
request: Request<AggregatorWithdrawalInput>,
) -> Pin<Box<dyn Future<Output = Result<Response<AggregatorWithdrawResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn withdraw<'life0, 'async_trait>(
&'life0 self,
request: Request<AggregatorWithdrawalInput>,
) -> Pin<Box<dyn Future<Output = Result<Response<AggregatorWithdrawResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_nofn_aggregated_xonly_pk<'life0, 'async_trait>(
&'life0 self,
__arg1: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<NofnResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn internal_get_emergency_stop_tx<'life0, 'async_trait>(
&'life0 self,
request: Request<GetEmergencyStopTxRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetEmergencyStopTxResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn internal_get_emergency_stop_tx<'life0, 'async_trait>(
&'life0 self,
request: Request<GetEmergencyStopTxRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetEmergencyStopTxResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_move_to_vault_tx<'life0, 'async_trait>(
&'life0 self,
request: Request<SendMoveTxRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Txid>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl Debug for AggregatorServer
impl Debug for AggregatorServer
Auto Trait Implementations§
impl Freeze for AggregatorServer
impl !RefUnwindSafe for AggregatorServer
impl Send for AggregatorServer
impl Sync for AggregatorServer
impl Unpin for AggregatorServer
impl !UnwindSafe for AggregatorServer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T, U> ExactFrom<T> for Uwhere
U: TryFrom<T>,
impl<T, U> ExactFrom<T> for Uwhere
U: TryFrom<T>,
fn exact_from(value: T) -> U
§impl<T, U> ExactInto<U> for Twhere
U: ExactFrom<T>,
impl<T, U> ExactInto<U> for Twhere
U: ExactFrom<T>,
fn exact_into(self) -> U
§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,
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,
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,
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,
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,
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,
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,
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,
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
§impl<T, U> OverflowingInto<U> for Twhere
U: OverflowingFrom<T>,
impl<T, U> OverflowingInto<U> for Twhere
U: OverflowingFrom<T>,
fn overflowing_into(self) -> (U, bool)
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg
] or
a color-specific method, such as [OwoColorize::green
], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg
] or
a color-specific method, such as [OwoColorize::on_yellow
], Read more§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
§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,
§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 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,
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
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
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
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T, U> RoundingInto<U> for Twhere
U: RoundingFrom<T>,
impl<T, U> RoundingInto<U> for Twhere
U: RoundingFrom<T>,
fn rounding_into(self, rm: RoundingMode) -> (U, Ordering)
§impl<T, U> SaturatingInto<U> for Twhere
U: SaturatingFrom<T>,
impl<T, U> SaturatingInto<U> for Twhere
U: SaturatingFrom<T>,
fn saturating_into(self) -> U
§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
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
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
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
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
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
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
.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
.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
.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
.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
.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
.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
.tap_deref()
only in debug builds, and is erased in release
builds.