use

inline fun <R> SyncClient.use(block: (SyncClient) -> R): R

Executes the given block function on SyncClient and then shuts it down correctly whether an exception is thrown or not.

Return

The result of block function invoked on this SyncClient.

Parameters

block

A function to process this SyncClient.


inline fun <R> SyncDocument.use(block: (SyncDocument) -> R): R

Executes the given block function on SyncDocument and then closes it down correctly whether an exception is thrown or not.

Return

The result of block function invoked on this SyncDocument.

Parameters

block

A function to process this SyncDocument.


inline fun <R> SyncMap.use(block: (SyncMap) -> R): R

Executes the given block function on SyncMap and then closes it down correctly whether an exception is thrown or not.

Return

The result of block function invoked on this SyncMap.

Parameters

block

A function to process this SyncMap.


inline fun <R> SyncList.use(block: (SyncList) -> R): R

Executes the given block function on SyncList and then closes it down correctly whether an exception is thrown or not.

Return

The result of block function invoked on this SyncList.

Parameters

block

A function to process this SyncList.


inline fun <R> SyncStream.use(block: (SyncStream) -> R): R

Executes the given block function on SyncStream and then closes it down correctly whether an exception is thrown or not.

Return

The result of block function invoked on this SyncStream.

Parameters

block

A function to process this SyncStream.