pub trait IClientModule: Debug {
Show 15 methods
// Required methods
fn as_any(&self) -> &(dyn Any + Send + Sync);
fn decoder(&self) -> Decoder;
fn context(&self, instance: ModuleInstanceId) -> DynContext;
fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn handle_cli_command<'life0, 'life1, 'async_trait>(
&'life0 self,
args: &'life1 [OsString],
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle_rpc<'life0, 'async_trait>(
&'life0 self,
method: String,
request: Value,
) -> Pin<Box<dyn Future<Output = BoxStream<'_, Result<Value>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn input_fee(&self, amount: Amount, input: &DynInput) -> Option<Amount>;
fn output_fee(&self, amount: Amount, output: &DynOutput) -> Option<Amount>;
fn supports_backup(&self) -> bool;
fn backup<'life0, 'async_trait>(
&'life0 self,
module_instance_id: ModuleInstanceId,
) -> Pin<Box<dyn Future<Output = Result<DynModuleBackup>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn supports_being_primary(&self) -> bool;
fn create_final_inputs_and_outputs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
module_instance: ModuleInstanceId,
dbtx: &'life1 mut DatabaseTransaction<'life2>,
operation_id: OperationId,
input_amount: Amount,
output_amount: Amount,
) -> Pin<Box<dyn Future<Output = Result<(ClientInputBundle, ClientOutputBundle)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn await_primary_module_output<'life0, 'async_trait>(
&'life0 self,
operation_id: OperationId,
out_point: OutPoint,
) -> Pin<Box<dyn Future<Output = Result<Amount>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_balance<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
module_instance: ModuleInstanceId,
dbtx: &'life1 mut DatabaseTransaction<'life2>,
) -> Pin<Box<dyn Future<Output = Amount> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn subscribe_balance_changes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = BoxStream<'static, ()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Type-erased version of ClientModule