Struct indy::pool::Pool

source ·
pub struct Pool {}

Implementations

Creates a new local pool ledger configuration that can be used later to connect pool nodes.

Arguments
  • config_name - Name of the pool ledger configuration.
  • config (required)- Pool configuration json. Example: { “genesis_txn”: string (required), A path to genesis transaction file. }

Creates a new local pool ledger configuration that can be used later to connect pool nodes.

Arguments
  • config_name - Name of the pool ledger configuration.
  • config (required)- Pool configuration json. Example: { “genesis_txn”: string (required), A path to genesis transaction file. }
  • timeout - the maximum time this function waits for a response

Creates a new local pool ledger configuration that can be used later to connect pool nodes.

Arguments
  • config_name - Name of the pool ledger configuration.
  • config (required)- Pool configuration json. Example:
  • closure - the closure that is called when finished
Returns
  • errorcode - errorcode from calling ffi function. The closure receives the return result

Opens pool ledger and performs connecting to pool nodes.

Pool ledger configuration with corresponded name must be previously created with indy_create_pool_ledger_config method. It is impossible to open pool with the same name more than once.

Arguments
  • config_name - Name of the pool ledger configuration.
  • config (optional)- Runtime pool configuration json. if NULL, then default config will be used. Example: { “refresh_on_open”: bool (optional), Forces pool ledger to be refreshed immediately after opening. Defaults to true. “auto_refresh_time”: int (optional), After this time in minutes pool ledger will be automatically refreshed. Use 0 to disable automatic refresh. Defaults to 24*60. “network_timeout”: int (optional), Network timeout for communication with nodes in milliseconds. Defaults to 20000. }
Returns

Handle to opened pool to use in methods that require pool connection.

Opens pool ledger and performs connecting to pool nodes.

Pool ledger configuration with corresponded name must be previously created with indy_create_pool_ledger_config method. It is impossible to open pool with the same name more than once.

Arguments
  • config_name - Name of the pool ledger configuration.
  • config (optional)- Runtime pool configuration json. if NULL, then default config will be used. Example: { “refresh_on_open”: bool (optional), Forces pool ledger to be refreshed immediately after opening. Defaults to true. “auto_refresh_time”: int (optional), After this time in minutes pool ledger will be automatically refreshed. Use 0 to disable automatic refresh. Defaults to 24*60. “network_timeout”: int (optional), Network timeout for communication with nodes in milliseconds. Defaults to 20000. }
  • timeout - the maximum time this function waits for a response
Returns

Handle to opened pool to use in methods that require pool connection.

Opens pool ledger and performs connecting to pool nodes.

Pool ledger configuration with corresponded name must be previously created with indy_create_pool_ledger_config method. It is impossible to open pool with the same name more than once.

Arguments
  • config_name - Name of the pool ledger configuration.
  • config (optional)- Runtime pool configuration json. if NULL, then default config will be used. Example: { “refresh_on_open”: bool (optional), Forces pool ledger to be refreshed immediately after opening. Defaults to true. “auto_refresh_time”: int (optional), After this time in minutes pool ledger will be automatically refreshed. Use 0 to disable automatic refresh. Defaults to 24*60. “network_timeout”: int (optional), Network timeout for communication with nodes in milliseconds. Defaults to 20000. }
  • closure - the closure that is called when finished
Returns
  • errorcode - errorcode from calling ffi function. The closure receives the return result

Refreshes a local copy of a pool ledger and updates pool nodes connections.

Arguments
  • handle - pool handle returned by Pool::open_ledger

Refreshes a local copy of a pool ledger and updates pool nodes connections.

Arguments
  • handle - pool handle returned by Pool::open_ledger
  • timeout - the maximum time this function waits for a response

Refreshes a local copy of a pool ledger and updates pool nodes connections.

Arguments
  • handle - pool handle returned by Pool::open_ledger
  • closure - the closure that is called when finished
Returns
  • errorcode - errorcode from calling ffi function. The closure receives the return result

Lists names of created pool ledgers

Lists names of created pool ledgers

  • timeout - the maximum time this function waits for a response

Lists names of created pool ledgers

  • closure - the closure that is called when finished
Returns
  • errorcode - errorcode from calling ffi function. The closure receives the return result

Closes opened pool ledger, opened nodes connections and frees allocated resources.

Arguments
  • handle - pool handle returned by Pool::open_ledger.

Closes opened pool ledger, opened nodes connections and frees allocated resources.

Arguments
  • handle - pool handle returned by Pool::open_ledger.
  • timeout - the maximum time this function waits for a response

Closes opened pool ledger, opened nodes connections and frees allocated resources.

Arguments
  • handle - pool handle returned by Pool::open_ledger.
  • closure - the closure that is called when finished
Returns
  • errorcode - errorcode from calling ffi function. The closure receives the return result

Deletes created pool ledger configuration.

Arguments
  • config_name - Name of the pool ledger configuration to delete.

Deletes created pool ledger configuration.

Arguments
  • config_name - Name of the pool ledger configuration to delete.
  • timeout - the maximum time this function waits for a response

Deletes created pool ledger configuration.

Arguments
  • config_name - Name of the pool ledger configuration to delete.
  • closure - the closure that is called when finished
Returns
  • errorcode - errorcode from calling ffi function. The closure receives the return result

Set PROTOCOL_VERSION to specific version.

There is a global property PROTOCOL_VERSION that used in every request to the pool and specified version of Indy Node which Libindy works.

By default PROTOCOL_VERSION=1.

Arguments
  • protocol_version - Protocol version will be used: 1 - for Indy Node 1.3 2 - for Indy Node 1.4

Set PROTOCOL_VERSION to specific version.

There is a global property PROTOCOL_VERSION that used in every request to the pool and specified version of Indy Node which Libindy works.

By default PROTOCOL_VERSION=1.

Arguments
  • protocol_version - Protocol version will be used: 1 - for Indy Node 1.3 2 - for Indy Node 1.4
  • timeout - the maximum time this function waits for a response

Set PROTOCOL_VERSION to specific version.

There is a global property PROTOCOL_VERSION that used in every request to the pool and specified version of Indy Node which Libindy works.

By default PROTOCOL_VERSION=1.

Arguments
  • protocol_version - Protocol version will be used: 1 - for Indy Node 1.3 2 - for Indy Node 1.4
  • closure - the closure that is called when finished
Returns
  • errorcode - errorcode from calling ffi function. The closure receives the return result

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.